projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b1fea6
)
fix: python dbm module doesn't accept unicode as key
author
Mounir Lamouri
<volkmar@gentoo.org>
Sat, 30 Jan 2010 14:11:13 +0000
(14:11 -0000)
committer
Mounir Lamouri
<volkmar@gentoo.org>
Sat, 30 Jan 2010 14:11:13 +0000
(14:11 -0000)
svn path=/main/trunk/; revision=15286
pym/portage/cache/anydbm.py
patch
|
blob
|
history
diff --git
a/pym/portage/cache/anydbm.py
b/pym/portage/cache/anydbm.py
index 6add2da60c7c7448d9185f535bc0dc7edf8d17f2..33cedebbb1f028f7a7c8d6af7eae6b0244b11708 100644
(file)
--- a/
pym/portage/cache/anydbm.py
+++ b/
pym/portage/cache/anydbm.py
@@
-63,10
+63,10
@@
class database(fs_template.FsBased):
def _getitem(self, cpv):
# we override getitem because it's just a cpickling of the data handed in.
- return pickle.loads(self.__db[
cpv
])
+ return pickle.loads(self.__db[
_unicode_encode(cpv)
])
def _setitem(self, cpv, values):
- self.__db[
cpv
] = pickle.dumps(values,pickle.HIGHEST_PROTOCOL)
+ self.__db[
_unicode_encode(cpv)
] = pickle.dumps(values,pickle.HIGHEST_PROTOCOL)
def _delitem(self, cpv):
del self.__db[cpv]