diff --git a/src/argus/notificationprofile/media/email.py b/src/argus/notificationprofile/media/email.py index 37e17a765..600490a99 100644 --- a/src/argus/notificationprofile/media/email.py +++ b/src/argus/notificationprofile/media/email.py @@ -45,7 +45,7 @@ def send_email_safely(function, additional_error=None, *args, **kwargs) -> int: try: result = function(*args, **kwargs) return result - except ConnectionRefusedError as e: + except ConnectionRefusedError: EMAIL_HOST = getattr(settings, "EMAIL_HOST", None) if not EMAIL_HOST: LOG.error("Notification: Email: EMAIL_HOST not set, cannot send")