mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
remove use of non-existent SSLFakeSocket in apparently untested code
This commit is contained in:
parent
910fa59595
commit
470dcd2611
1 changed files with 2 additions and 4 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue