summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjctanner <tanner.jc@gmail.com>2013-12-17 23:04:05 +0100
committerjctanner <tanner.jc@gmail.com>2013-12-17 23:04:05 +0100
commit320d41149a062ab4e61136debf9d3c8963317e1b (patch)
tree1ff33a855972e5a2fff6e32d689a8b1741b04ab3 /library
parentMerge pull request #5225 from prometheanfire/devel (diff)
parentcatch exposed cs.exceptions instead of novaclient (diff)
downloadansible-320d41149a062ab4e61136debf9d3c8963317e1b.tar.xz
ansible-320d41149a062ab4e61136debf9d3c8963317e1b.zip
Merge pull request #5289 from rstrox/devel
rax: import novaclient.exceptions for cs.images.find
Diffstat (limited to 'library')
-rw-r--r--library/cloud/rax8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cloud/rax b/library/cloud/rax
index 4ec1391c82..d67802ce1e 100644
--- a/library/cloud/rax
+++ b/library/cloud/rax
@@ -366,12 +366,12 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files,
except ValueError:
try:
image = cs.images.find(human_id=image)
- except (pyrax.exceptions.NotFound,
- pyrax.exceptions.NoUniqueMatch):
+ except(cs.exceptions.NotFound,
+ cs.exceptions.NoUniqueMatch):
try:
image = cs.images.find(name=image)
- except (pyrax.exceptions.NotFound,
- pyrax.exceptions.NoUniqueMatch):
+ except (cs.exceptions.NotFound,
+ cs.exceptions.NoUniqueMatch):
module.fail_json(msg='No matching image found (%s)' %
image)