Mercurial > kallithea
changeset 7799:3009a239199d
smtp_mailer: clarify that sslerror is ssl.SSLError - slightly clearer, and Python 3 compatible
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 21 Jul 2019 23:34:47 +0200 |
parents | 5bfda9c04db5 |
children | d9421a78a534 |
files | kallithea/lib/rcmail/smtp_mailer.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/rcmail/smtp_mailer.py Mon Jul 22 01:18:14 2019 +0200 +++ b/kallithea/lib/rcmail/smtp_mailer.py Sun Jul 21 23:34:47 2019 +0200 @@ -28,8 +28,9 @@ import time import logging import smtplib -from socket import sslerror +from ssl import SSLError from email.utils import formatdate + from kallithea.lib.rcmail.message import Message from kallithea.lib.rcmail.utils import DNS_NAME @@ -100,6 +101,6 @@ try: smtp_serv.quit() - except sslerror: - # sslerror is raised in tls connections on closing sometimes + except SSLError: + # SSL error might sometimes be raised in tls connections on closing smtp_serv.close()