[email] Shorter way to raise an exception
This commit is contained in:
parent
ecba2fb595
commit
668b702735
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue