mirror of https://github.com/kianby/stacosys
src\stacosys\service\mail.py broad-exception-caught
Catching Exception might hide unexpected exceptions, like those that might be raised due to future modification. Therefore, it is recommended to narrow the exceptions. The method send of the class Mailer catches Exception in line 57. MIMEText does not raise exceptions (if not using attachments). See https://docs.python.org/3/library/email.mime.html Most code is handled in an inner exception handling. In order to catch exception from SMTP_SSL I used SMTPException See https://docs.python.org/3/library/smtplib.htmlpull/22/head
parent
dc776881e4
commit
25ed2f06e0
Loading…
Reference in New Issue