Explorar o código

ensure cb is not None

Ask Solem %!s(int64=12) %!d(string=hai) anos
pai
achega
39f683fe5c
Modificáronse 1 ficheiros con 2 adicións e 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: