ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [incubator-ponymail] branch master updated: pylint: narrow catch
Date Mon, 21 May 2018 00:27:53 GMT
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 4aca493  pylint: narrow catch
4aca493 is described below

commit 4aca49313cd0268020314bfcc5350f851c424f89
Author: Sebb <sebb@apache.org>
AuthorDate: Mon May 21 01:27:52 2018 +0100

    pylint: narrow catch
---
 tools/edit-list.py | 2 +-
 tools/setup.py     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/edit-list.py b/tools/edit-list.py
index 1f38137..61f1f4f 100755
--- a/tools/edit-list.py
+++ b/tools/edit-list.py
@@ -35,7 +35,7 @@ import json
 
 try:
     from elasticsearch import Elasticsearch, helpers
-except:
+except ImportError:
     print("Sorry, you need to install the elasticsearch and formatflowed modules from pip
first.")
     sys.exit(-1)
 
diff --git a/tools/setup.py b/tools/setup.py
index 378608b..0851b0b 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -29,7 +29,7 @@ try:
     from elasticsearch import Elasticsearch
     from elasticsearch import VERSION as ES_VERSION
     ES_MAJOR = ES_VERSION[0]
-except:
+except ImportError:
     dopip = True
     
 if dopip and (getpass.getuser() != "root"):
@@ -44,7 +44,7 @@ elif dopip:
     try:
         subprocess.check_call(('pip3','install','elasticsearch','formatflowed', 'netaddr',
'certifi'))
         from elasticsearch import Elasticsearch
-    except:
+    except ImportError:
         print("Oh dear, looks like this failed :(")
         print("Please install elasticsearch and formatflowed before you try again:")
         print("pip install elasticsearch formatflowed netaddr certifi")

-- 
To stop receiving notification emails like this one, please contact
sebb@apache.org.

Mime
View raw message