diff --git a/library/cloud/rax b/library/cloud/rax index 4ec1391c821..d67802ce1e0 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)