From 2225ec03ff3c6506b2c9a7555d82797b04eead97 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 26 May 2007 02:41:39 +0000 Subject: [PATCH] Fix broken dict.get logic. svn path=/main/trunk/; revision=6634 --- pym/portage/dbapi/bintree.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 = {} -- 2.26.2