summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGGabriele <gabrielegerbino@gmail.com>2016-04-19 14:57:06 +0200
committerGGabriele <gabrielegerbino@gmail.com>2016-04-19 14:57:06 +0200
commit2466e407f4e4720e0c6f9f28a34116d3ea907687 (patch)
treecb4a10b0e2f6563c41cb945c33e355a7ffa66768
parent6afeb471ad17608ff961143ffe28bd626e0f32df (diff)
downloadansible-modules-core-2466e407f4e4720e0c6f9f28a34116d3ea907687.tar.gz
fix conditional for py24
-rw-r--r--network/nxos/nxos_vrf.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/network/nxos/nxos_vrf.py b/network/nxos/nxos_vrf.py
index 491e7067..47863480 100644
--- a/network/nxos/nxos_vrf.py
+++ b/network/nxos/nxos_vrf.py
@@ -129,8 +129,10 @@ def get_cli_body_ssh_vrf(command, response):
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(cmds),
error=str(clie))