Explorar o código

"and not", not "or not"

Ask Solem %!s(int64=16) %!d(string=hai) anos
pai
achega
19acb368f1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      celery/worker.py

+ 1 - 1
celery/worker.py

@@ -252,7 +252,7 @@ class TaskWrapper(object):
         self.logger.error(self.fail_msg.strip() % context)
 
         task_obj = tasks.get(task_name, object)
-        send_error_email = SEND_CELERY_TASK_ERROR_EMAILS or not \
+        send_error_email = SEND_CELERY_TASK_ERROR_EMAILS and not \
                 getattr(task_obj, "disable_error_emails", False)
         if send_error_email:
             subject = self.fail_email_subject.strip() % context