Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

lint: Work around a pyflakes bug.

Tim Abbott52676c0670fd
diff --git a/zerver/worker/queue_processors.py b/zerver/worker/queue_processors.py
index c41fd0870e9..d133a01e87b 100644
--- a/zerver/worker/queue_processors.py
+++ b/zerver/worker/queue_processors.py
@@ -151,8 +151,10 @@ def retry_send_email_failures(
func(worker, data)
except (smtplib.SMTPServerDisconnected, socket.gaierror, socket.timeout,
EmailNotDeliveredException) as e:
+ error_class_name = e.__class__.__name__
+
def on_failure(event: Dict[str, Any]) -> None:
- logging.exception("Event %r failed due to exception %s", event, e.__class__.__name__)
+ logging.exception("Event %r failed due to exception %s", event, error_class_name)
retry_event(worker.queue_name, data, on_failure)