cache/sqlite.py: unicode_literals
authorZac Medico <zmedico@gentoo.org>
Fri, 18 Jan 2013 16:37:18 +0000 (08:37 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 18 Jan 2013 16:37:18 +0000 (08:37 -0800)
pym/portage/cache/sqlite.py

index 9c1b3eb7eedd4d1ec17aad9ba24b0da51b7a1621..8a9f747cec6f3c7399d70d58dbf80242070064ee 100644 (file)
@@ -1,6 +1,8 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+from __future__ import unicode_literals
+
 import re
 import sys
 from portage.cache import fs_template
@@ -21,7 +23,6 @@ class database(fs_template.FsBased):
        # to calculate the number of pages requested, according to the following
        # equation: cache_bytes = page_bytes * page_count
        cache_bytes = 1024 * 1024 * 10
-       _EMPTY_STRING = _unicode_decode("")
 
        def __init__(self, *args, **config):
                super(database, self).__init__(*args, **config)
@@ -215,7 +216,7 @@ class database(fs_template.FsBased):
                                v = result[column_index]
                                if v is None:
                                        # This happens after a new empty column has been added.
-                                       v = self._EMPTY_STRING
+                                       v = ""
                                d[k] = v
 
                return d