summaryrefslogtreecommitdiff
path: root/clustering/consul.py
diff options
context:
space:
mode:
authorMichael Scherer <misc@zarb.org>2016-10-17 15:33:02 +0200
committerToshio Kuratomi <a.badger@gmail.com>2016-10-17 13:48:18 -0700
commit3f77bb6857243992f95316e3cd37d01e7f229d64 (patch)
tree3098a759c77bcd277d0dded66bad12a9d0840454 /clustering/consul.py
parent8dd32a8134f361185799368fce155393605175a3 (diff)
downloadansible-modules-extras-3f77bb6857243992f95316e3cd37d01e7f229d64.tar.gz
Make consul modules pass sanity test for python 3
Diffstat (limited to 'clustering/consul.py')
-rw-r--r--clustering/consul.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/clustering/consul.py b/clustering/consul.py
index b9cdfb09..a034e167 100644
--- a/clustering/consul.py
+++ b/clustering/consul.py
@@ -219,7 +219,7 @@ try:
import consul
from requests.exceptions import ConnectionError
python_consul_installed = True
-except ImportError, e:
+except ImportError:
python_consul_installed = False
def register_with_consul(module):
@@ -560,10 +560,10 @@ def main():
try:
register_with_consul(module)
- except ConnectionError, e:
+ except ConnectionError as e:
module.fail_json(msg='Could not connect to consul agent at %s:%s, error was %s' % (
module.params.get('host'), module.params.get('port'), str(e)))
- except Exception, e:
+ except Exception as e:
module.fail_json(msg=str(e))
# import module snippets