Fixing error handling

This commit is contained in:
GGabriele 2016-09-14 08:42:53 +02:00
parent 6a5ab25264
commit eb31af5a47

View file

@ -239,7 +239,8 @@ def load_config(module, candidate):
def execute_config_command(commands, module):
try:
body = module.configure(commands)
except ShellError, clie:
except ShellError:
clie = get_exception()
module.fail_json(msg='Error sending CLI commands',
error=str(clie), commands=commands)
return body