1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixes commit a28eb94, which broke validate_certs = False for python < 2.7.9 (#34887)

This commit is contained in:
Mike Klebolt 2018-03-05 10:34:03 -06:00 committed by ansibot
parent daeec920b0
commit ce416f247f

View file

@ -1808,7 +1808,7 @@ def main():
module.fail_json(msg='pysphere does not support verifying certificates with python < 2.7.9. Either update python or set '
'validate_certs=False on the task')
if not validate_certs:
if not validate_certs and hasattr(ssl, 'SSLContext'):
ssl._create_default_https_context = ssl._create_unverified_context
try: