From 1b6019f6e091c64ec50739947a661428294c354e Mon Sep 17 00:00:00 2001 From: Jens Rantil Date: Fri, 13 Dec 2013 21:34:02 +0100 Subject: [PATCH] module(file): Fail instead of exit on exception --- library/files/file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/files/file b/library/files/file index 55249e62fbd..8dcead1b402 100644 --- a/library/files/file +++ b/library/files/file @@ -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: %s" % str(e)) + module.fail_json(msg="rmtree failed: %s" % str(e)) else: if module.check_mode: module.exit_json(changed=True)