fix conditional for py24
This commit is contained in:
parent
6afeb471ad
commit
2466e407f4
1 changed files with 4 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue