summaryrefslogtreecommitdiff
path: root/network/nxos/nxos_ping.py
diff options
context:
space:
mode:
authorMichael Scherer <mscherer@users.noreply.github.com>2016-05-18 18:08:30 +0200
committerToshio Kuratomi <a.badger@gmail.com>2016-05-18 09:08:30 -0700
commitcc99fe24fc0f582acb0915e857e88dc3be149a55 (patch)
treeda2154bf666524e0ed13b9e0593b6149e36f6234 /network/nxos/nxos_ping.py
parent368f8f0ac7c319a3db12681ca6629d219dded144 (diff)
downloadansible-modules-core-cc99fe24fc0f582acb0915e857e88dc3be149a55.tar.gz
Convert the network subfolder to py3/py2.4 syntax (#3690)
Diffstat (limited to 'network/nxos/nxos_ping.py')
-rw-r--r--network/nxos/nxos_ping.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/network/nxos/nxos_ping.py b/network/nxos/nxos_ping.py
index be3fab9d..9f7e912c 100644
--- a/network/nxos/nxos_ping.py
+++ b/network/nxos/nxos_ping.py
@@ -150,7 +150,8 @@ def execute_show(cmds, module, command_type=None):
response = module.execute(cmds, command_type=command_type)
else:
response = module.execute(cmds)
- except ShellError, clie:
+ except ShellError:
+ clie = get_exception()
module.fail_json(msg='Error sending {0}'.format(cmds),
error=str(clie))
return response
@@ -257,4 +258,4 @@ from ansible.module_utils.shell import *
from ansible.module_utils.netcfg import *
from ansible.module_utils.nxos import *
if __name__ == '__main__':
- main() \ No newline at end of file
+ main()