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.

ruff: Fix UP041 Replace aliased errors with `TimeoutError`.

Anders Kaseorg7e2ef11f618b
diff --git a/zerver/worker/queue_processors.py b/zerver/worker/queue_processors.py
index f5a21d07550..3c0ba264695 100644
--- a/zerver/worker/queue_processors.py
+++ b/zerver/worker/queue_processors.py
@@ -199,11 +199,7 @@ def retry_send_email_failures(
def wrapper(worker: ConcreteQueueWorker, data: Dict[str, Any]) -> None:
try:
func(worker, data)
- except (
- socket.gaierror,
- socket.timeout,
- EmailNotDeliveredError,
- ) as e:
+ except (socket.gaierror, TimeoutError, EmailNotDeliveredError) as e:
error_class_name = type(e).__name__
def on_failure(event: Dict[str, Any]) -> None: