1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix conditional for py24

This commit is contained in:
GGabriele 2016-04-19 14:59:01 +02:00 committed by Matt Clay
parent cda210c3f9
commit 10238bbb06

View file

@ -114,8 +114,10 @@ def get_cli_body_ssh_vrf_interface(command, response, module):
def execute_show(cmds, module, command_type=None): def execute_show(cmds, module, command_type=None):
try: try:
response = module.execute(cmds, if command_type:
command_type=command_type) if command_type else module.execute(cmds) response = module.execute(cmds, command_type=command_type)
else:
response = module.execute(cmds)
except ShellError, clie: except ShellError, clie:
module.fail_json(msg='Error sending {0}'.format(command), module.fail_json(msg='Error sending {0}'.format(command),
error=str(clie)) error=str(clie))