From 7e2ef11f618bb5a4e21324ab89d814bea09ca1b0 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 1 Apr 2024 15:38:57 -0700 Subject: [PATCH] ruff: Fix UP041 Replace aliased errors with `TimeoutError`. Signed-off-by: Anders Kaseorg --- zerver/worker/queue_processors.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/zerver/worker/queue_processors.py b/zerver/worker/queue_processors.py index f5a21d0755..3c0ba26469 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: