Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion splunklib/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,11 @@ def connect(scheme, host, port):
if cert_file is not None: kwargs['cert_file'] = cert_file

if not verify:
kwargs['context'] = ssl._create_unverified_context()
try:
kwargs['context'] = ssl._create_unverified_context()
except AttributeError:
# Legacy Python that doesn't support verify PEP 476
pass
return six.moves.http_client.HTTPSConnection(host, port, **kwargs)
raise ValueError("unsupported scheme: %s" % scheme)

Expand Down