summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-20 20:12:31 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-20 20:12:31 +0000
commit3a2ab616594cdef440d268bea1f26df7f149d109 (patch)
treeedfba122794f600bc9c79972efaba204792c7e48 /pym
parentf56ee8cd2fa86ba74c3b67b1b4edcb6eca76766b (diff)
downloadportage-3a2ab616594cdef440d268bea1f26df7f149d109.tar.gz
portage-3a2ab616594cdef440d268bea1f26df7f149d109.tar.bz2
portage-3a2ab616594cdef440d268bea1f26df7f149d109.zip
For bug #161356, fix error handling for currupt ebuilds. (trunk 5735:5737)
svn path=/main/branches/2.1.2/; revision=5738
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 542f3ae86..a4855269c 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6036,8 +6036,14 @@ class portdbapi(dbapi):
raise KeyError
myslot = portage_dep.dep_getslot(mydep)
if myslot is not None:
- myval = [cpv for cpv in myval \
- if self.aux_get(cpv, ["SLOT"])[0] == myslot]
+ slotmatches = []
+ for cpv in myval:
+ try:
+ if self.aux_get(cpv, ["SLOT"])[0] == myslot:
+ slotmatches.append(cpv)
+ except KeyError:
+ pass # ebuild masked by corruption
+ myval = slotmatches
if self.frozen and (level not in ["match-list","bestmatch-list"]):
self.xcache[level][mydep]=myval
if origdep and origdep != mydep: