Fixes #23890 Remove idle ShellError exception and get_exception() method from nxos modules (#23947)

Remove idle ShellError exception and get_exception() method from nxos modules
This commit is contained in:
Trishna Guha 2017-04-28 10:42:15 +05:30 committed by GitHub
commit bc22223d63
15 changed files with 29 additions and 91 deletions

View file

@ -233,13 +233,9 @@ def main():
True in existing.values()) or restart):
candidate = CustomNetworkConfig(indent=3)
invoke('get_commands', module, existing, proposed_args, candidate)
response = load_config(module, candidate)
result.update(response)
try:
response = load_config(module, candidate)
result.update(response)
except ShellError:
exc = get_exception()
module.fail_json(msg=str(exc))
else:
result['updates'] = []