mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Replace check for Elasticsearch to str/list in ensure_es_client (#690)
This commit is contained in:
parent
e76b32eee2
commit
5b728c29c1
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user