* [gentoo-commits] portage r10802 - main/trunk/pym/portage/dbapi
@ 2008-06-26 18:24 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-06-26 18:24 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-06-26 18:24:34 +0000 (Thu, 26 Jun 2008)
New Revision: 10802
Modified:
main/trunk/pym/portage/dbapi/__init__.py
Log:
Handle KeyError from aux_get() inside dbapi._iter_match_slot() and
_iter_match_use(). Thanks to grobian for reporting.
Modified: main/trunk/pym/portage/dbapi/__init__.py
===================================================================
--- main/trunk/pym/portage/dbapi/__init__.py 2008-06-26 17:11:52 UTC (rev 10801)
+++ main/trunk/pym/portage/dbapi/__init__.py 2008-06-26 18:24:34 UTC (rev 10802)
@@ -135,8 +135,11 @@
def _iter_match_slot(self, atom, cpv_iter):
for cpv in cpv_iter:
- if self.aux_get(cpv, ["SLOT"])[0] == atom.slot:
- yield cpv
+ try:
+ if self.aux_get(cpv, ["SLOT"])[0] == atom.slot:
+ yield cpv
+ except KeyError:
+ continue
def _iter_match_use(self, atom, cpv_iter):
"""
@@ -146,7 +149,10 @@
if self._iuse_implicit is None:
self._iuse_implicit = self.settings._get_implicit_iuse()
for cpv in cpv_iter:
- iuse, use = self.aux_get(cpv, ["IUSE", "USE"])
+ try:
+ iuse, use = self.aux_get(cpv, ["IUSE", "USE"])
+ except KeyError:
+ continue
use = use.split()
iuse = self._iuse_implicit.union(
re.escape(x.lstrip("+-")) for x in iuse.split())
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-26 18:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-26 18:24 [gentoo-commits] portage r10802 - main/trunk/pym/portage/dbapi Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox