Explorar el Código

ensure cb is not None

Ask Solem hace 12 años
padre
commit
39f683fe5c
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      celery/worker/loops.py

+ 2 - 0
celery/worker/loops.py

@@ -105,6 +105,8 @@ def asynloop(obj, connection, consumer, strategies, ns, hub, qos,
                             elif event & ERR:
                                 cb = (readers.get(fileno) or
                                       writers.get(fileno))
+                                if cb is None:
+                                    continue
                             if isinstance(cb, generator):
                                 cb.send((fileno, event))
                             else: