Merge pull request #22 from evidencebp/main

Pylint alerts corrections as part of an intervention experiment 21 (src\stacosys\service\mail.py broad-exception-caught)
main
Yax 1 week ago committed by GitHub
commit 0d144a683f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,7 +3,7 @@
import logging
from email.mime.text import MIMEText
from smtplib import SMTP_SSL, SMTPAuthenticationError
from smtplib import SMTP_SSL, SMTPAuthenticationError, SMTPException
logger = logging.getLogger(__name__)
@ -54,6 +54,6 @@ class Mailer:
server.send_message(msg)
return True
except Exception:
except SMTPException:
logger.error("Error sending email", exc_info=True)
return False

Loading…
Cancel
Save