Browse Source

Add a sensible __repr__ to ExceptionInfo for easier debugging

Ask Solem 15 years ago
parent
commit
197d8880ab
1 changed files with 6 additions and 0 deletions
  1. 6 0
      celery/datastructures.py

+ 6 - 0
celery/datastructures.py

@@ -73,6 +73,12 @@ class ExceptionInfo(object):
     def __str__(self):
         return str(self.exception)
 
+    def __repr__(self):
+        return "<%s.%s: %s" % (
+                self.__class__.__module__,
+                self.__class__.__name__,
+                str(self.exception))
+
 
 def consume_queue(queue):
     while True: