fix conditional for py24

reviewable/pr18780/r1
GGabriele 9 years ago
parent da0ed0ce9b
commit 14e334285f

@ -62,8 +62,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))

Loading…
Cancel
Save