Skip to content

Commit

Permalink
Remove unnecessary exception from nxos_command (ansible#3521)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos authored and mattclay committed Dec 8, 2016
1 parent c5b7e45 commit 75dbe9f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/ansible/modules/network/nxos/nxos_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,8 @@ def main():
kwargs['command_type'] = 'cli_show'

while retries > 0:
try:
response = module.execute(commands, **kwargs)
result['stdout'] = response
except ShellError, exc:
module.fail_json(msg='failed to run commands', exc=exc.message,
command=exc.command)
response = module.execute(commands, **kwargs)
result['stdout'] = response

for index, cmd in enumerate(commands):
if cmd.endswith('json'):
Expand Down

0 comments on commit 75dbe9f

Please sign in to comment.