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
pull/27221/merge
Toshio Kuratomi 7 years ago
parent a3d8b9eef4
commit 8b34e31e05

@ -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):

Loading…
Cancel
Save