##// END OF EJS Templates
mailer: bit of code cleanup
marcink -
r2933:3df7f0a4 default
parent child Browse files
Show More
@@ -24,8 +24,9 b' Simple smtp mailer used in RhodeCode'
24 24
25 25 import time
26 26 import logging
27 from socket import sslerror
27 import socket
28 28 from email.utils import formatdate
29
29 30 from rhodecode.lib.rcmail.message import Message
30 31 from rhodecode.lib.rcmail.utils import DNS_NAME
31 32
@@ -60,7 +61,7 b' class SmtpMailer(object):'
60 61 self.auth = smtp_auth
61 62
62 63 def _get_smptlib(self):
63 #patch the output
64 # patch the output
64 65 import smtplib
65 66
66 67 class StderrLogger(object):
@@ -114,6 +115,6 b' class SmtpMailer(object):'
114 115
115 116 try:
116 117 smtp_serv.quit()
117 except sslerror:
118 except socket.sslerror:
118 119 # sslerror is raised in tls connections on closing sometimes
119 120 smtp_serv.close()
General Comments 0
You need to be logged in to leave comments. Login now