diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-01 19:14:28 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-01 19:14:28 +0000 |
commit | 18be1bc2f537dc465343280c32352fcb68661e12 (patch) | |
tree | 4d17f072c4f9a3707a942e43b00b77d98b8d3abe /pym/portage.py | |
parent | 2b40f5dadd81ae84c6d1df2cf0930e2e5b5ec69f (diff) | |
download | portage-18be1bc2f537dc465343280c32352fcb68661e12.tar.gz portage-18be1bc2f537dc465343280c32352fcb68661e12.tar.bz2 portage-18be1bc2f537dc465343280c32352fcb68661e12.zip |
Raise a KeyError from bindbapi.aux_get() when appropriate. (trunk r6699)
svn path=/main/branches/2.1.2/; revision=6712
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 9 |
1 files changed, 6 insertions, 3 deletions
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 = {} |