From 75dbe9f1e8df2ca1bc469f0f051b4b48fda5eb51 Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Mon, 25 Apr 2016 13:26:06 -0400 Subject: [PATCH] Remove unnecessary exception from nxos_command (#3521) --- lib/ansible/modules/network/nxos/nxos_command.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/network/nxos/nxos_command.py b/lib/ansible/modules/network/nxos/nxos_command.py index 21a6b56628c..2e09584dcc5 100644 --- a/lib/ansible/modules/network/nxos/nxos_command.py +++ b/lib/ansible/modules/network/nxos/nxos_command.py @@ -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'):