Commit f4aa808b by Jens Rantil

module(file): state what went wrong on exception

parent 705316e3
...@@ -235,7 +235,7 @@ def main(): ...@@ -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)
......
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