From: Zac Medico Date: Sat, 26 May 2007 02:41:39 +0000 (-0000) Subject: Fix broken dict.get logic. X-Git-Tag: v2.2_pre1~1363 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2225ec03ff3c6506b2c9a7555d82797b04eead97;p=portage.git Fix broken dict.get logic. svn path=/main/trunk/; revision=6634 --- diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index b2c528dbc..c81de292e 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -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 = {}