mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 10:43:14 +00:00
Guard the PROTOCOL setting so that we work on older pythons
This commit is contained in:
@@ -109,8 +109,9 @@ except ImportError:
|
||||
# Select a protocol that includes all secure tls protocols
|
||||
# Exclude insecure ssl protocols if possible
|
||||
|
||||
# If we can't find extra tls methods, ssl.PROTOCOL_TLSv1 is sufficient
|
||||
PROTOCOL = ssl.PROTOCOL_TLSv1
|
||||
if HAS_SSL:
|
||||
# If we can't find extra tls methods, ssl.PROTOCOL_TLSv1 is sufficient
|
||||
PROTOCOL = ssl.PROTOCOL_TLSv1
|
||||
if not HAS_SSLCONTEXT and HAS_SSL:
|
||||
try:
|
||||
import ctypes, ctypes.util
|
||||
|
||||
Reference in New Issue
Block a user