Prevent an empty error message

reviewable/pr18780/r1
Matt Martz 10 years ago
parent 0b0040a4ae
commit a4e65e8e6e

@ -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…
Cancel
Save