fix conditional for py24

This commit is contained in:
GGabriele 2016-04-19 14:48:53 +02:00
parent 026ddfcc46
commit 67d416576f

View file

@ -114,8 +114,10 @@ def get_cli_body_ssh(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))