Avoid TypeError in BlockerCache.__iter__() that's triggered with
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 21:20:59 +0000 (21:20 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 21:20:59 +0000 (21:20 -0000)
FEATURES=python-trace. Thanks to Fabian Groffen <grobian@g.o> for reporting.
(trunk r12180)

svn path=/main/branches/2.1.6/; revision=12216

pym/_emerge/__init__.py

index 36670f69a2370df7dec928d58f0addc84053e2b7..5acd3be804d29a906ab06f19dd7f76aa58adf3ba 100644 (file)
@@ -3874,6 +3874,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):