소스 검색

Thread does not have ident attr on Py 2.5

Ask Solem 14 년 전
부모
커밋
bc45ddd2bd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      celery/utils/__init__.py

+ 1 - 1
celery/utils/__init__.py

@@ -421,7 +421,7 @@ def cry():
     # get a map of threads by their ID so we can print their names
     # during the traceback dump
     for t in threading.enumerate():
-        if t.ident:
+        if getattr(t, "ident", None):
             tmap[t.ident] = t
         else:
             main_thread = t