Implement BlockerCache.keys() so that DictMixin.__repr__() works. (branches/2.1.2...
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 05:36:55 +0000 (05:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 05:36:55 +0000 (05:36 -0000)
svn path=/main/branches/2.1.2.9/; revision=7489

bin/emerge

index be441ba5974dc7706aa5037538335624a63e5d76..f6599308fdbef0a80cfee646cc69b4b608e81368 100755 (executable)
@@ -880,6 +880,13 @@ class BlockerCache(DictMixin):
                """
                return self.BlockerData(*self._cache_data["blockers"][cpv])
 
+       def keys(self):
+               """This needs to be implemented so that self.__repr__() doesn't raise
+               an AttributeError."""
+               if self._cache_data and "blockers" in self._cache_data:
+                       return self._cache_data["blockers"].keys()
+               return []
+
 def show_invalid_depstring_notice(parent_node, depstring, error_msg):
 
        from formatter import AbstractFormatter, DumbWriter