Raise a KeyError from bindbapi.aux_get() when appropriate.
authorZac Medico <zmedico@gentoo.org>
Thu, 31 May 2007 21:28:06 +0000 (21:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 31 May 2007 21:28:06 +0000 (21:28 -0000)
svn path=/main/trunk/; revision=6699

pym/portage/dbapi/bintree.py

index d6c4b1418b16cca685a4bafd7c5264c8af2fa685..98bc8ddefa1ca6169a68fcd34ab440bb33302022 100644 (file)
@@ -46,6 +46,8 @@ class bindbapi(fakedbapi):
                if not self.bintree._remotepkgs or \
                        not self.bintree.isremote(mycpv):
                        tbz2_path = self.bintree.getname(mycpv)
+                       if not os.path.exists(mycpv):
+                               raise KeyError(mycpv)
                        getitem = portage.xpak.tbz2(tbz2_path).getfile
                else:
                        getitem = self.bintree._remotepkgs[mycpv].get