From 38d0df65d83bc290bffc22940c8ca5520c0d84d3 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 --- files/file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/file b/files/file index 55249e62fbd..8dcead1b402 100644 --- a/files/file +++ b/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)