Task.__repr__: handle python-trace
authorZac Medico <zmedico@gentoo.org>
Tue, 19 Mar 2013 20:21:43 +0000 (13:21 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Mar 2013 20:21:43 +0000 (13:21 -0700)
pym/_emerge/Task.py

index 769884bcf5a25177e69db01aeb406c7067ebffc3..250d45802b82934b11b922c8154e30b876f38e14 100644 (file)
@@ -43,5 +43,8 @@ class Task(SlotObject):
                return "(%s)" % ", ".join(("'%s'" % x for x in self._hash_key))
 
        def __repr__(self):
+               if self._hash_key is None:
+                       # triggered by python-trace
+                       return SlotObject.__repr__(self)
                return "<%s (%s)>" % (self.__class__.__name__,
                        ", ".join(("'%s'" % x for x in self._hash_key)))