Skip to content

Commit

Permalink
Added support for opensearch-py client connections urllib3httpconnect…
Browse files Browse the repository at this point in the history
…ion, requestshttpconnection.

Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi committed Jan 23, 2024
1 parent cba1df9 commit e43f9bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions osbenchmark/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ def create(self):

if "connection_class" in self.client_options:
connection = self.client_options.pop("connection_class", None)
if connection.lower() in {"urllib3httpconnection", "urllib3"}:
connection_class = osbenchmark.sync_connection.Urllib3HttpConnection
elif connection.lower() in {"requestshttpconnection", "requests"}:
if connection.lower() in {"requestshttpconnection", "requests"}:
connection_class = osbenchmark.sync_connection.RequestsHttpConnection
else:
connection_class = osbenchmark.sync_connection.Urllib3HttpConnection
else:
connection_class = osbenchmark.sync_connection.Urllib3HttpConnection

Expand Down

0 comments on commit e43f9bf

Please sign in to comment.