stages/email: catch ValueError when global email settings are invalid

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-27 15:20:09 +02:00
parent 378402fcf0
commit ed49d7824e
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ def send_mail(
messages=["Successfully sent Mail."],
)
)
except (SMTPException, ConnectionError) as exc:
except (SMTPException, ConnectionError, ValueError) as exc:
LOGGER.debug("Error sending email, retrying...", exc=exc)
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))
raise exc