mirror of https://github.com/zulip/zulip.git
ruff: Fix UP041 Replace aliased errors with `TimeoutError`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
6e871e7731
commit
7e2ef11f61
|
@ -199,11 +199,7 @@ def retry_send_email_failures(
|
||||||
def wrapper(worker: ConcreteQueueWorker, data: Dict[str, Any]) -> None:
|
def wrapper(worker: ConcreteQueueWorker, data: Dict[str, Any]) -> None:
|
||||||
try:
|
try:
|
||||||
func(worker, data)
|
func(worker, data)
|
||||||
except (
|
except (socket.gaierror, TimeoutError, EmailNotDeliveredError) as e:
|
||||||
socket.gaierror,
|
|
||||||
socket.timeout,
|
|
||||||
EmailNotDeliveredError,
|
|
||||||
) as e:
|
|
||||||
error_class_name = type(e).__name__
|
error_class_name = type(e).__name__
|
||||||
|
|
||||||
def on_failure(event: Dict[str, Any]) -> None:
|
def on_failure(event: Dict[str, Any]) -> None:
|
||||||
|
|
Loading…
Reference in New Issue