Explorar el Código

Thread does not have ident attr on Py 2.5

Ask Solem hace 14 años
padre
commit
bc45ddd2bd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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