diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-23 23:06:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-23 23:06:39 (GMT) |
commit | f9284ae8ede5b8977248a4259eee0cd81a100c16 (patch) | |
tree | b3430fd55e6b76ee01dfd6ac4a0baa52de7b7a3a /Lib/imaplib.py | |
parent | f1a3240ba86408a2cdb88a2bfa38a2dce1f4ed9c (diff) | |
parent | 7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b (diff) | |
download | cpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.zip cpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.tar.gz cpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.tar.bz2 |
merge 3.4 (#22921)
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 27445dd..49ee39d 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -753,9 +753,8 @@ class IMAP4: ssl_context = ssl._create_stdlib_context() typ, dat = self._simple_command(name) if typ == 'OK': - server_hostname = self.host if ssl.HAS_SNI else None self.sock = ssl_context.wrap_socket(self.sock, - server_hostname=server_hostname) + server_hostname=self.host) self.file = self.sock.makefile('rb') self._tls_established = True self._get_capabilities() @@ -1231,9 +1230,8 @@ if HAVE_SSL: def _create_socket(self): sock = IMAP4._create_socket(self) - server_hostname = self.host if ssl.HAS_SNI else None return self.ssl_context.wrap_socket(sock, - server_hostname=server_hostname) + server_hostname=self.host) def open(self, host='', port=IMAP4_SSL_PORT): """Setup connection to remote server on "host:port". |