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

svn path=/main/trunk/; revision=12180

pym/_emerge/__init__.py

index bb9ae689d657c4cfbbd0fea7cdef632c2068361b..996590da0a25a6713dcae0505575d6e0e62bf86a 100644 (file)
@@ -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):