mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Applying 499081490 fix for rax.py to v2
This commit is contained in:
committed by
James Cammarata
parent
313d01736a
commit
29201c0dea
@@ -315,7 +315,11 @@ def setup_rax_module(module, rax_module, region_required=True):
|
|||||||
else:
|
else:
|
||||||
raise Exception('No credentials supplied!')
|
raise Exception('No credentials supplied!')
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
module.fail_json(msg='%s' % e.message)
|
if e.message:
|
||||||
|
msg = str(e.message)
|
||||||
|
else:
|
||||||
|
msg = repr(e)
|
||||||
|
module.fail_json(msg=msg)
|
||||||
|
|
||||||
if region_required and region not in rax_module.regions:
|
if region_required and region not in rax_module.regions:
|
||||||
module.fail_json(msg='%s is not a valid region, must be one of: %s' %
|
module.fail_json(msg='%s is not a valid region, must be one of: %s' %
|
||||||
|
|||||||
Reference in New Issue
Block a user