# HG changeset patch # User Arthur Lutz <arthur.lutz@logilab.fr> # Date 1484237056 -3600 # Thu Jan 12 17:04:16 2017 +0100 # Node ID e6db12c7be3355f705dedfcc39329c1b85850200 # Parent 155a20154f844efa5436f26b5b092c9ee17027e1 [es] better escaping of index checking, only if index-name is not None (related #17049617) diff --git a/es.py b/es.py --- a/es.py +++ b/es.py @@ -110,7 +110,7 @@ """ try: - if not es.indices.exists(index=index_name): + if index_name and not es.indices.exists(index=index_name): es.indices.create(index=index_name, body=settings) except (ConnectionError, ProtocolError):