summaryrefslogtreecommitdiff
path: root/cloud/cloudstack/cs_sshkeypair.py
diff options
context:
space:
mode:
authorRene Moser <mail@renemoser.net>2015-05-16 11:45:48 +0200
committerRene Moser <mail@renemoser.net>2015-05-16 11:55:35 +0200
commit0f884ead4088933d2a28940e2fd7b0e7b4926fbb (patch)
tree688713a23f4c93c801ee6b004eceb376655848ad /cloud/cloudstack/cs_sshkeypair.py
parent2b7a40a46a01a52ffcf78803c7030d01cdf350d5 (diff)
downloadansible-modules-extras-0f884ead4088933d2a28940e2fd7b0e7b4926fbb.tar.gz
cloudstack: add catch all exceptions and show a user friendly message
Also see GH-493.
Diffstat (limited to 'cloud/cloudstack/cs_sshkeypair.py')
-rw-r--r--cloud/cloudstack/cs_sshkeypair.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloud/cloudstack/cs_sshkeypair.py b/cloud/cloudstack/cs_sshkeypair.py
index 995e0b5b..0d2e2c82 100644
--- a/cloud/cloudstack/cs_sshkeypair.py
+++ b/cloud/cloudstack/cs_sshkeypair.py
@@ -245,6 +245,9 @@ def main():
except CloudStackException, e:
module.fail_json(msg='CloudStackException: %s' % str(e))
+ except Exception, e:
+ module.fail_json(msg='Exception: %s' % str(e))
+
module.exit_json(**result)
# import module snippets