summaryrefslogtreecommitdiff
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorBill Janssen <janssen@parc.com>2007-08-31 19:03:31 +0000
committerBill Janssen <janssen@parc.com>2007-08-31 19:03:31 +0000
commit470dcd261174a35e24459260938e991606c5d87b (patch)
tree3ffd89757086191be0c941f315211edb8f8796c9 /Lib/smtplib.py
parent910fa59595196a247c3fac792b78c48d9a73abe3 (diff)
downloadcpython-git-470dcd261174a35e24459260938e991606c5d87b.tar.gz
remove use of non-existent SSLFakeSocket in apparently untested code
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 5b2c6a013a..529984833b 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -162,7 +162,6 @@ try:
except ImportError:
_have_ssl = False
else:
-
class SSLFakeFile:
"""A fake file like object that really wraps a SSLObject.
@@ -721,9 +720,8 @@ if _have_ssl:
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")