Show More
@@ -24,8 +24,9 b' Simple smtp mailer used in RhodeCode' | |||||
24 |
|
24 | |||
25 | import time |
|
25 | import time | |
26 | import logging |
|
26 | import logging | |
27 | from socket import sslerror |
|
27 | import socket | |
28 | from email.utils import formatdate |
|
28 | from email.utils import formatdate | |
|
29 | ||||
29 | from rhodecode.lib.rcmail.message import Message |
|
30 | from rhodecode.lib.rcmail.message import Message | |
30 | from rhodecode.lib.rcmail.utils import DNS_NAME |
|
31 | from rhodecode.lib.rcmail.utils import DNS_NAME | |
31 |
|
32 | |||
@@ -114,6 +115,6 b' class SmtpMailer(object):' | |||||
114 |
|
115 | |||
115 | try: |
|
116 | try: | |
116 | smtp_serv.quit() |
|
117 | smtp_serv.quit() | |
117 | except sslerror: |
|
118 | except socket.sslerror: | |
118 | # sslerror is raised in tls connections on closing sometimes |
|
119 | # sslerror is raised in tls connections on closing sometimes | |
119 | smtp_serv.close() |
|
120 | smtp_serv.close() |
General Comments 0
You need to be logged in to leave comments.
Login now