ソースを参照

Add a sensible __repr__ to ExceptionInfo for easier debugging

Ask Solem 17 年 前
親
コミット
197d8880ab
1 ファイル変更、6 行追加、0 行削除
  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: