Commit cbfab13b by Brian Coca

Merge pull request #10421 from sivel/empty-error-msg

rax module ultis: Prevent an empty error message
parents 0ff77b36 49908149
......@@ -315,7 +315,11 @@ def setup_rax_module(module, rax_module, region_required=True):
else:
raise Exception('No credentials supplied!')
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:
module.fail_json(msg='%s is not a valid region, must be one of: %s' %
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment