module(file): state what went wrong on exception
This commit is contained in:
parent
705316e303
commit
f4aa808b8d
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ def main():
|
|||
module.exit_json(changed=True)
|
||||
shutil.rmtree(path, ignore_errors=False)
|
||||
except Exception, e:
|
||||
module.exit_json(msg="rmtree failed")
|
||||
module.exit_json(msg="rmtree failed: %s" % str(e))
|
||||
else:
|
||||
if module.check_mode:
|
||||
module.exit_json(changed=True)
|
||||
|
|
Loading…
Reference in a new issue