Sfoglia il codice sorgente

TaskRequest.on_failure now encodes traceback to the current filesystem encoding, not hardcoded utf-8. Closes #286

Ask Solem 14 anni fa
parent
commit
aa66cb6f40
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      celery/worker/job.py

+ 2 - 1
celery/worker/job.py

@@ -476,7 +476,8 @@ class TaskRequest(object):
                    "id": self.task_id,
                    "name": self.task_name,
                    "exc": repr(exc_info.exception),
-                   "traceback": unicode(exc_info.traceback, 'utf-8'),
+                   "traceback": unicode(exc_info.traceback,
+                                        sys.getfilesystemencoding()),
                    "args": self.args,
                    "kwargs": self.kwargs}