summaryrefslogtreecommitdiffstats
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r--Lib/nntplib.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index d33faf8..bcf7d1b 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -289,8 +289,7 @@ if _have_ssl:
# Generate a default SSL context if none was passed.
if context is None:
context = ssl._create_stdlib_context()
- server_hostname = hostname if ssl.HAS_SNI else None
- return context.wrap_socket(sock, server_hostname=server_hostname)
+ return context.wrap_socket(sock, server_hostname=hostname)
# The classes themselves