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

This fixes issue #5159.
pull/5160/head
Jens Rantil 11 years ago
parent 27199dc219
commit 705316e303

@ -234,7 +234,7 @@ def main():
if module.check_mode: if module.check_mode:
module.exit_json(changed=True) module.exit_json(changed=True)
shutil.rmtree(path, ignore_errors=False) shutil.rmtree(path, ignore_errors=False)
except: except Exception, e:
module.exit_json(msg="rmtree failed") module.exit_json(msg="rmtree failed")
else: else:
if module.check_mode: if module.check_mode:

Loading…
Cancel
Save