mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Prevent an empty error message
This commit is contained in:
parent
34dbd69e12
commit
bcd9f83521
1 changed files with 5 additions and 1 deletions
|
@ -314,7 +314,11 @@ def create(module, names=[], flavor=None, image=None, meta={}, key_name=None,
|
||||||
block_device_mapping_v2=bdmv2,
|
block_device_mapping_v2=bdmv2,
|
||||||
**extra_create_args))
|
**extra_create_args))
|
||||||
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)
|
||||||
else:
|
else:
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue