From 8b34e31e054eedeb8232f27cad61984ced384169 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 24 Jul 2017 22:14:19 -0700 Subject: [PATCH] Remove the error checking from apply_patch() The error checking would itself cause a traceback. The load_config() function that we'd need to check for errors from only returns None so there's no way to check for errors via the return value. In the future someone could rewrite the load_config function to return useful information and restore the error checking but for now this is better as it won't traceback on success and it will let us turn on static analysis of undefined variables Fixes #27255 References #27254 --- lib/ansible/modules/network/nxos/nxos_smu.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/ansible/modules/network/nxos/nxos_smu.py b/lib/ansible/modules/network/nxos/nxos_smu.py index e3c238bd44..c208f1285b 100644 --- a/lib/ansible/modules/network/nxos/nxos_smu.py +++ b/lib/ansible/modules/network/nxos/nxos_smu.py @@ -114,8 +114,6 @@ def apply_patch(module, commands): for command in commands: load_config(module, [command]) time.sleep(5) - if 'failed' in response: - module.fail_json(msg="Operation failed!", response=response) def get_commands(module, pkg, file_system):