[email] Shorter way to raise an exception

This commit is contained in:
maike 2020-07-12 16:50:28 +02:00 committed by dl6tom
parent ecba2fb595
commit 668b702735

View file

@ -44,9 +44,7 @@ class EmailBot(Censor):
body=message.text, body=message.text,
) )
except (ConnectionRefusedError, SMTPException): except (ConnectionRefusedError, SMTPException):
logger.error( logger.exception("Sending subscription confirmation email failed.")
"Sending subscription confirmation email failed.", exc_info=True
)
spawner = Spawner(Email, EmailBot) spawner = Spawner(Email, EmailBot)