Commit 705316e3 by Jens Rantil

`file` module: Don't catch `SystemExit`

This fixes issue #5159.
parent 27199dc2
......@@ -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:
......
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