[Python-checkins] r57856 - python/trunk/Lib/smtplib.py

bill.janssen python-checkins at python.org
Fri Aug 31 21:03:31 CEST 2007


Author: bill.janssen
Date: Fri Aug 31 21:03:31 2007
New Revision: 57856

Modified:
   python/trunk/Lib/smtplib.py
Log:
remove use of non-existent SSLFakeSocket in apparently untested code

Modified: python/trunk/Lib/smtplib.py
==============================================================================
--- python/trunk/Lib/smtplib.py	(original)
+++ python/trunk/Lib/smtplib.py	Fri Aug 31 21:03:31 2007
@@ -162,7 +162,6 @@
 except ImportError:
     _have_ssl = False
 else:
-
     class SSLFakeFile:
         """A fake file like object that really wraps a SSLObject.
 
@@ -721,9 +720,8 @@
         def _get_socket(self, host, port, timeout):
             if self.debuglevel > 0: print>>stderr, 'connect:', (host, port)
             self.sock = socket.create_connection((host, port), timeout)
-            sslobj = socket.ssl(self.sock, self.keyfile, self.certfile)
-            self.sock = SSLFakeSocket(self.sock, sslobj)
-            self.file = SSLFakeFile(sslobj)
+            self.sock = ssl.sslsocket(self.sock, self.keyfile, self.certfile)
+            self.file = SSLFakeFile(self.sock)
 
     __all__.append("SMTP_SSL")
 


More information about the Python-checkins mailing list