Просмотр исходного кода

maybe_conn_error: Add AttributeError to the list (if connection is None)

Ask Solem 14 лет назад
Родитель
Сommit
d455cd93ae
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      celery/worker/consumer.py

+ 3 - 1
celery/worker/consumer.py

@@ -346,7 +346,9 @@ class Consumer(object):
     def maybe_conn_error(self, fun):
         try:
             fun()
-        except self.connection_errors:
+        except (AttributeError, ) + \
+                self.connection_errors + \
+                self.channel_errors:
             pass
 
     def close_connection(self):