file module: Don't catch SystemExit

This fixes issue #5159.
This commit is contained in:
Jens Rantil 2013-12-04 13:13:49 +01:00
parent edc877d6b0
commit b8347a3144

View 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: