diff options
author | 2015-09-24 13:25:46 -0700 | |
---|---|---|
committer | 2015-09-24 13:30:06 -0700 | |
commit | 9073762274c112f3d080367ea0fb24edb88564be (patch) | |
tree | 4dd843b0be130d28a74352e86a66a7193606a782 | |
parent | repository/config.py: Fix propogation of module_specific_options (bug 561240) (diff) | |
download | portage-90737622.tar.gz portage-90737622.tar.bz2 portage-90737622.zip |
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")
-rw-r--r-- | pym/portage/dbapi/virtual.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage/dbapi/virtual.py b/pym/portage/dbapi/virtual.py index a59c3b54b..f2e841fcd 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 |