You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2018/05/26 12:10:15 UTC
[incubator-ponymail] branch master updated: Use specific error
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.git
The following commit(s) were added to refs/heads/master by this push:
new b5e70ce Use specific error
b5e70ce is described below
commit b5e70ce4e8b80a0d8f462b5471d10961dc7c1030
Author: Sebb <se...@apache.org>
AuthorDate: Sat May 26 13:10:14 2018 +0100
Use specific error
---
tools/elastic.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/elastic.py b/tools/elastic.py
index 9ca1cd0..8e813a2 100755
--- a/tools/elastic.py
+++ b/tools/elastic.py
@@ -26,7 +26,7 @@ import logging
import certifi
try:
- from elasticsearch import Elasticsearch, helpers, ElasticsearchException
+ from elasticsearch import Elasticsearch, helpers, ConnectionError
from elasticsearch import VERSION as ES_VERSION
except ImportError as e:
sys.exit("Sorry, you need to install the elasticsearch module from pip first. (%s)" % str(e))
@@ -76,7 +76,7 @@ class Elastic:
if not self.dbVersion:
try:
self.dbVersion = self.info()['version']['number']
- except ElasticsearchException:
+ except ConnectionError:
# default if cannot connect; allows retry
return '0.0.0'
return self.dbVersion
--
To stop receiving notification emails like this one, please contact
sebb@apache.org.