Fix error handling

This commit is contained in:
GGabriele 2016-09-03 00:52:37 +02:00 committed by Matt Clay
parent 1d393941c0
commit 4ee018e51d

View file

@ -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,