mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 22:51:23 -07:00
Remove unnecessary exception from nxos_command (#3521)
This commit is contained in:
parent
c5b7e456bd
commit
75dbe9f1e8
1 changed files with 2 additions and 6 deletions
|
@ -157,12 +157,8 @@ def main():
|
||||||
kwargs['command_type'] = 'cli_show'
|
kwargs['command_type'] = 'cli_show'
|
||||||
|
|
||||||
while retries > 0:
|
while retries > 0:
|
||||||
try:
|
response = module.execute(commands, **kwargs)
|
||||||
response = module.execute(commands, **kwargs)
|
result['stdout'] = response
|
||||||
result['stdout'] = response
|
|
||||||
except ShellError, exc:
|
|
||||||
module.fail_json(msg='failed to run commands', exc=exc.message,
|
|
||||||
command=exc.command)
|
|
||||||
|
|
||||||
for index, cmd in enumerate(commands):
|
for index, cmd in enumerate(commands):
|
||||||
if cmd.endswith('json'):
|
if cmd.endswith('json'):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue