reconstruct_eclasses: unicode hashes for python2 v2.2.0_alpha108
authorZac Medico <zmedico@gentoo.org>
Thu, 24 May 2012 19:06:11 +0000 (12:06 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 24 May 2012 19:06:11 +0000 (12:06 -0700)
pym/portage/cache/template.py

index 0ab6e0a1f3061896d861ce98b40082f43c2e84b7..cf1e8aebb0f500718f6be80e90ff57d019afd06e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright: 2005 Gentoo Foundation
+# Copyright: 2005-2012 Gentoo Foundation
 # Author(s): Brian Harring (ferringb@gentoo.org)
 # License: GPL2
 
@@ -10,8 +10,11 @@ import warnings
 import operator
 
 if sys.hexversion >= 0x3000000:
+       _unicode = str
        basestring = str
        long = int
+else:
+       _unicode = unicode
 
 class database(object):
        # this is for metadata/cache transfer.
@@ -273,7 +276,7 @@ def reconstruct_eclasses(cpv, eclass_string, chf_type='mtime', paths=True):
                # occasionally this occurs in the fs backends.  they suck.
                return {}
 
-       converter = str
+       converter = _unicode
        if chf_type == 'mtime':
                converter = long