Skip to content

Commit 5dfd698

Browse files
committed
Only pass in cert to request.session if client_cert specified
1 parent fe6e9a7 commit 5dfd698

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch/connection/http_requests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, host='localhost', port=9200, http_auth=None,
4646
self.session.verify = verify_certs
4747
if not client_key:
4848
self.session.cert = client_cert
49-
else:
49+
elif client_cert:
5050
# cert is a tuple of (certfile, keyfile)
5151
self.session.cert = (client_cert, client_key)
5252
if ca_certs:

0 commit comments

Comments
 (0)