diff mercurial/mail.py @ 25429:9d1c61715939

ssl: rename ssl_wrap_socket() to conform to our naming convention I've removed ssl_ prefix because the module name contains ssl.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 05 Jun 2015 21:25:28 +0900
parents ff2ec757aacb
children 03af5c2ddf75
line wrap: on
line diff
--- a/mercurial/mail.py	Fri Jun 05 07:49:06 2015 +0900
+++ b/mercurial/mail.py	Fri Jun 05 21:25:28 2015 +0900
@@ -45,8 +45,8 @@
             raise smtplib.SMTPException(msg)
         (resp, reply) = self.docmd("STARTTLS")
         if resp == 220:
-            self.sock = sslutil.ssl_wrap_socket(self.sock, keyfile, certfile,
-                                                **self._sslkwargs)
+            self.sock = sslutil.wrapsocket(self.sock, keyfile, certfile,
+                                           **self._sslkwargs)
             if not util.safehasattr(self.sock, "read"):
                 # using httplib.FakeSocket with Python 2.5.x or earlier
                 self.sock.read = self.sock.recv
@@ -74,9 +74,9 @@
             if self.debuglevel > 0:
                 print >> sys.stderr, 'connect:', (host, port)
             new_socket = socket.create_connection((host, port), timeout)
-            new_socket = sslutil.ssl_wrap_socket(new_socket,
-                                                 self.keyfile, self.certfile,
-                                                 **self._sslkwargs)
+            new_socket = sslutil.wrapsocket(new_socket,
+                                            self.keyfile, self.certfile,
+                                            **self._sslkwargs)
             self.file = smtplib.SSLFakeFile(new_socket)
             return new_socket
 else: