summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-08 20:55:07 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-08 20:55:07 +0000
commit459faf4f5bdbbcba2ce5f088408bf8a3e235d460 (patch)
treee9f4b7e4d7bc6f9d5254decb0a7701a92bad6d6f
parentecefa1d9eb50e9b38d209d2b27d68625c1f8f61d (diff)
downloadportage-459faf4f5bdbbcba2ce5f088408bf8a3e235d460.tar.gz
portage-459faf4f5bdbbcba2ce5f088408bf8a3e235d460.tar.bz2
portage-459faf4f5bdbbcba2ce5f088408bf8a3e235d460.zip
Avoid TypeError in BlockerCache.__iter__() that's triggered with
FEATURES=python-trace. Thanks to Fabian Groffen <grobian@g.o> for reporting. svn path=/main/trunk/; revision=12180
-rw-r--r--pym/_emerge/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index bb9ae689d..996590da0 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -3890,6 +3890,9 @@ class BlockerCache(DictMixin):
self._modified.add(cpv)
def __iter__(self):
+ if self._cache_data is None:
+ # triggered by python-trace
+ return iter([])
return iter(self._cache_data["blockers"])
def __delitem__(self, cpv):