1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

module(file): state what went wrong on exception

This commit is contained in:
Jens Rantil 2013-12-13 21:33:19 +01:00
parent 705316e303
commit f4aa808b8d

View file

@ -235,7 +235,7 @@ def main():
module.exit_json(changed=True) module.exit_json(changed=True)
shutil.rmtree(path, ignore_errors=False) shutil.rmtree(path, ignore_errors=False)
except Exception, e: except Exception, e:
module.exit_json(msg="rmtree failed") module.exit_json(msg="rmtree failed: %s" % str(e))
else: else:
if module.check_mode: if module.check_mode:
module.exit_json(changed=True) module.exit_json(changed=True)