From cd0285b567b307ae04435aa342f40714d2ed6ac3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 24 May 2012 12:06:11 -0700 Subject: [PATCH] reconstruct_eclasses: unicode hashes for python2 --- pym/portage/cache/template.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pym/portage/cache/template.py b/pym/portage/cache/template.py index 0ab6e0a1f..cf1e8aebb 100644 --- a/pym/portage/cache/template.py +++ b/pym/portage/cache/template.py @@ -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 -- 2.26.2