From 8a8025ba2d04d06b1fa02e3035b33b798f3d561d Mon Sep 17 00:00:00 2001 From: jedelman8 Date: Tue, 19 Apr 2016 05:43:23 -0700 Subject: [PATCH] fix conditional for py24 --- network/nxos/nxos_switchport.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/network/nxos/nxos_switchport.py b/network/nxos/nxos_switchport.py index 2645c1fda4f..8e5c8bf06c0 100644 --- a/network/nxos/nxos_switchport.py +++ b/network/nxos/nxos_switchport.py @@ -465,7 +465,10 @@ def get_cli_body_ssh(command, response, module): def execute_show(cmds, module, command_type=None): try: - response = module.execute(cmds, command_type=command_type) if command_type else module.execute(cmds) + if command_type: + response = module.execute(cmds, command_type=command_type) + else: + response = module.execute(cmds) except ShellError, clie: module.fail_json(msg='Error sending {0}'.format(command), error=str(clie))