Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/cache/
Date: Thu, 24 May 2012 19:06:36
Message-Id: 1337886371.cd0285b567b307ae04435aa342f40714d2ed6ac3.zmedico@gentoo
1 commit: cd0285b567b307ae04435aa342f40714d2ed6ac3
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 24 19:06:11 2012 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu May 24 19:06:11 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cd0285b5
7
8 reconstruct_eclasses: unicode hashes for python2
9
10 ---
11 pym/portage/cache/template.py | 7 +++++--
12 1 files changed, 5 insertions(+), 2 deletions(-)
13
14 diff --git a/pym/portage/cache/template.py b/pym/portage/cache/template.py
15 index 0ab6e0a..cf1e8ae 100644
16 --- a/pym/portage/cache/template.py
17 +++ b/pym/portage/cache/template.py
18 @@ -1,4 +1,4 @@
19 -# Copyright: 2005 Gentoo Foundation
20 +# Copyright: 2005-2012 Gentoo Foundation
21 # Author(s): Brian Harring (ferringb@g.o)
22 # License: GPL2
23
24 @@ -10,8 +10,11 @@ import warnings
25 import operator
26
27 if sys.hexversion >= 0x3000000:
28 + _unicode = str
29 basestring = str
30 long = int
31 +else:
32 + _unicode = unicode
33
34 class database(object):
35 # this is for metadata/cache transfer.
36 @@ -273,7 +276,7 @@ def reconstruct_eclasses(cpv, eclass_string, chf_type='mtime', paths=True):
37 # occasionally this occurs in the fs backends. they suck.
38 return {}
39
40 - converter = str
41 + converter = _unicode
42 if chf_type == 'mtime':
43 converter = long