diff options
author | jctanner <tanner.jc@gmail.com> | 2013-12-17 23:04:05 +0100 |
---|---|---|
committer | jctanner <tanner.jc@gmail.com> | 2013-12-17 23:04:05 +0100 |
commit | 320d41149a062ab4e61136debf9d3c8963317e1b (patch) | |
tree | 1ff33a855972e5a2fff6e32d689a8b1741b04ab3 /library | |
parent | Merge pull request #5225 from prometheanfire/devel (diff) | |
parent | catch exposed cs.exceptions instead of novaclient (diff) | |
download | ansible-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/rax | 8 |
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) |