mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
adds additional details in exception handling to ios shared module
This commit is contained in:
parent
008395eda2
commit
f5bcd38380
1 changed files with 2 additions and 0 deletions
|
@ -127,6 +127,8 @@ class NetworkModule(AnsibleModule):
|
|||
def execute(self, commands, **kwargs):
|
||||
try:
|
||||
return self.connection.send(commands, **kwargs)
|
||||
except ShellError, exc:
|
||||
self.fail_json(msg=exc.message, command=exc.command)
|
||||
except Exception, exc:
|
||||
self.fail_json(msg=exc.message, commands=commands)
|
||||
|
||||
|
|
Loading…
Reference in a new issue