Skip to content

Commit

Permalink
Replace check for Elasticsearch to str/list in ensure_es_client (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
AshokChoudhary11 authored May 4, 2024
1 parent e76b32e commit 5b728c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eland/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ def ensure_es_client(
) -> Elasticsearch:
if isinstance(es_client, tuple):
es_client = list(es_client)
if not isinstance(es_client, Elasticsearch):
if (
isinstance(es_client, str)
or isinstance(es_client, list)
or isinstance(es_client, tuple)
):
es_client = Elasticsearch(es_client)
return es_client

Expand Down

0 comments on commit 5b728c2

Please sign in to comment.