Fix error handling
This commit is contained in:
parent
1d393941c0
commit
4ee018e51d
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue