From b8347a31440fea36b91fe762645e0cde49ef9b85 Mon Sep 17 00:00:00 2001 From: Jens Rantil Date: Wed, 4 Dec 2013 13:13:49 +0100 Subject: [PATCH] `file` module: Don't catch `SystemExit` This fixes issue #5159. --- files/file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/file b/files/file index 134b5284efd..c68a2bcfa6d 100644 --- a/files/file +++ b/files/file @@ -234,7 +234,7 @@ def main(): if module.check_mode: module.exit_json(changed=True) shutil.rmtree(path, ignore_errors=False) - except: + except Exception, e: module.exit_json(msg="rmtree failed") else: if module.check_mode: