mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 09:43:15 +00:00
Fix error handling
This commit is contained in:
@@ -853,7 +853,8 @@ def main():
|
||||
try:
|
||||
apply_patch(module, commands)
|
||||
changed=True
|
||||
except Exception as e:
|
||||
except ShellError:
|
||||
e = get_exception()
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
module.exit_json(changed=changed,
|
||||
|
||||
Reference in New Issue
Block a user