From 18be1bc2f537dc465343280c32352fcb68661e12 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 1 Jun 2007 19:14:28 +0000 Subject: Raise a KeyError from bindbapi.aux_get() when appropriate. (trunk r6699) svn path=/main/branches/2.1.2/; revision=6712 --- pym/portage.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pym') diff --git a/pym/portage.py b/pym/portage.py index c08faf150..20ed0569f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -4954,9 +4954,12 @@ class bindbapi(fakedbapi): mysplit = mycpv.split("/") mylist = [] tbz2name = mysplit[1]+".tbz2" - if self.bintree and not self.bintree.isremote(mycpv): - tbz2 = xpak.tbz2(self.bintree.getname(mycpv)) - getitem = tbz2.getfile + if not self.bintree.remotepkgs or \ + not self.bintree.isremote(mycpv): + tbz2_path = self.bintree.getname(mycpv) + if not os.path.exists(tbz2_path): + raise KeyError(mycpv) + getitem = xpak.tbz2(tbz2_path).getfile else: getitem = self.bintree.remotepkgs[tbz2name].get mydata = {} -- cgit v1.2.3-1-g7c22