summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-21 01:55:27 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-21 01:55:27 +0000
commit3eaa2ce16e643816507068a7033c618425dd83c4 (patch)
tree31e3b5b71afd66e2489cf986a2c32b0752853c1e /bin/glsa-check
parentFor python-3.0 compatibility, open files in binary mode inside (diff)
downloadportage-idfetch-3eaa2ce16e643816507068a7033c618425dd83c4.tar.gz
portage-idfetch-3eaa2ce16e643816507068a7033c618425dd83c4.tar.bz2
portage-idfetch-3eaa2ce16e643816507068a7033c618425dd83c4.zip
Inside summarylist(), it's possible for myglsa.packages.keys() to contain
unicode objects, which trigger and exception like this: File "//usr/lib64/portage/pym/portage/dep.py", line 535, in __init__ obj_setattr(self, x, getattr(s, x)) AttributeError: 'unicode' object has no attribute '__eq__' To solve this problem, convert unicode objects to plain str before passing them to the portage api. svn path=/main/trunk/; revision=12667
Diffstat (limited to 'bin/glsa-check')
-rw-r--r--bin/glsa-check2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/glsa-check b/bin/glsa-check
index b7b9b47d..3c72f6a5 100644
--- a/bin/glsa-check
+++ b/bin/glsa-check
@@ -176,7 +176,7 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr):
fd1.write("... ")
else:
for pkg in myglsa.packages.keys():
- mylist = vardb.match(portage.dep_getkey(pkg))
+ mylist = vardb.match(portage.dep_getkey(str(pkg)))
if len(mylist) > 0:
pkg = color(" ".join(mylist))
fd1.write(" " + pkg + " ")