From 10238bbb06486a75dec4227adea514ebfa670a72 Mon Sep 17 00:00:00 2001 From: GGabriele Date: Tue, 19 Apr 2016 14:59:01 +0200 Subject: [PATCH] fix conditional for py24 --- lib/ansible/modules/network/nxos/nxos_vrf_interface.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/nxos/nxos_vrf_interface.py b/lib/ansible/modules/network/nxos/nxos_vrf_interface.py index 091e8255c8..b331922546 100644 --- a/lib/ansible/modules/network/nxos/nxos_vrf_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_vrf_interface.py @@ -114,8 +114,10 @@ def get_cli_body_ssh_vrf_interface(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))