This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new ac60f62 Fix up test
ac60f62 is described below
commit ac60f62903f8a5af136e884dde74257aa035f42a
Author: Sebb <[email protected]>
AuthorDate: Mon Aug 17 17:31:28 2020 +0100
Fix up test
---
tools/plugins/elastic.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/plugins/elastic.py b/tools/plugins/elastic.py
index 896caf0..a7b0c8c 100755
--- a/tools/plugins/elastic.py
+++ b/tools/plugins/elastic.py
@@ -198,15 +198,17 @@ class _indices_wrap(object):
def exists(self, *args, **kwargs):
return self.es.indices.exists(*args, **kwargs)
-
-if __name__ == "__main__":
+def main():
es = Elastic()
print(
"Versions: Library: %d %s Engine: %d (%s)"
% (es.libraryMajor(), es.libraryVersion(), es.engineMajor(),
es.engineVersion())
)
try:
- print(es.indices.exists(index="ponymail"))
+ print(es.indices.exists(index=es.db_mbox))
print(es.indices.exists("test"))
except ES_ConnectionError as e:
print(type(e))
+
+if __name__ == "__main__":
+ main()
\ No newline at end of file