mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 23:21:22 -07:00
Merge pull request #5160 from JensRantil/fix-issue-5159
Fixes #5159 `file` module: Don't catch `SystemExit`
This commit is contained in:
commit
53a3671df4
1 changed files with 2 additions and 2 deletions
|
@ -234,8 +234,8 @@ 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.fail_json(msg="rmtree failed: %s" % str(e))
|
||||||
else:
|
else:
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
module.exit_json(changed=True)
|
module.exit_json(changed=True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue