Commit 8ee3b738 by Toshio Kuratomi

Guard the PROTOCOL setting so that we work on older pythons

parent 36382fac
...@@ -109,8 +109,9 @@ except ImportError: ...@@ -109,8 +109,9 @@ except ImportError:
# Select a protocol that includes all secure tls protocols # Select a protocol that includes all secure tls protocols
# Exclude insecure ssl protocols if possible # Exclude insecure ssl protocols if possible
# If we can't find extra tls methods, ssl.PROTOCOL_TLSv1 is sufficient if HAS_SSL:
PROTOCOL = ssl.PROTOCOL_TLSv1 # If we can't find extra tls methods, ssl.PROTOCOL_TLSv1 is sufficient
PROTOCOL = ssl.PROTOCOL_TLSv1
if not HAS_SSLCONTEXT and HAS_SSL: if not HAS_SSLCONTEXT and HAS_SSL:
try: try:
import ctypes, ctypes.util import ctypes, ctypes.util
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment