commit: 9073762274c112f3d080367ea0fb24edb88564be
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 24 20:25:46 2015 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 24 20:30:06 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=90737622
fakedbapi.cpv_exists: handle KeyError from _instance_key
Since commit 7921e61065502fd0bb08d9dfef6a4493657961bf, cpv_exists
needs to handle KeyError from _instance_key_multi_instance.
Fixes: 7921e6106550 ("binpkg-multi-instance 2 of 7")
pym/portage/dbapi/virtual.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pym/portage/dbapi/virtual.py b/pym/portage/dbapi/virtual.py
index a59c3b5..f2e841f 100644
--- a/pym/portage/dbapi/virtual.py
+++ b/pym/portage/dbapi/virtual.py
@@ -98,8 +98,12 @@ class fakedbapi(dbapi):
return result[:]
def cpv_exists(self, mycpv, myrepo=None):
- return self._instance_key(mycpv,
- support_string=True) in self.cpvdict
+ try:
+ return self._instance_key(mycpv,
+ support_string=True) in self.cpvdict
+ except KeyError:
+ # _instance_key failure
+ return False
def cp_list(self, mycp, use_cache=1, myrepo=None):
# NOTE: Cache can be safely shared with the match cache, since
the