Fix broken dict.get logic.
authorZac Medico <zmedico@gentoo.org>
Sat, 26 May 2007 02:41:39 +0000 (02:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 26 May 2007 02:41:39 +0000 (02:41 -0000)
svn path=/main/trunk/; revision=6634

pym/portage/dbapi/bintree.py

index b2c528dbc7f9a7aa5c3c0ddd36395cb69b19dbc8..c81de292e53c3377f5782f35233e5dead85c78ac 100644 (file)
@@ -402,8 +402,10 @@ class binarytree(object):
                                        # Validate data from the package index and try to avoid
                                        # reading the xpak if possible.
                                        if mydir != "All":
-                                               mycpv = mydir + "/" + myfile[:-5]
-                                               possibilities = [metadata.get(mycpv)]
+                                               possibilities = None
+                                               d = metadata.get(mydir+"/"+myfile[:-5])
+                                               if d:
+                                                       possibilities = [d]
                                        else:
                                                if pf_index is None:
                                                        pf_index = {}