From 55f285a384e5b787e93927bce568363bd91e47d8 Mon Sep 17 00:00:00 2001 From: chkp-orso <47325598+chkp-orso@users.noreply.github.com> Date: Wed, 18 Sep 2019 18:00:42 +0200 Subject: [PATCH] fix if equals error code if command not found (#62529) --- lib/ansible/module_utils/network/checkpoint/checkpoint.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/module_utils/network/checkpoint/checkpoint.py b/lib/ansible/module_utils/network/checkpoint/checkpoint.py index 123d0ff9492..01e78651eb8 100644 --- a/lib/ansible/module_utils/network/checkpoint/checkpoint.py +++ b/lib/ansible/module_utils/network/checkpoint/checkpoint.py @@ -367,6 +367,8 @@ def api_call_for_rule(module, api_call_object): # if code is 400 (bad request) or 500 (internal error) - fail if equals_code == 400 or equals_code == 500: module.fail_json(msg=equals_response) + if equals_code == 404 and equals_response['code'] == 'generic_err_command_not_found': + module.fail_json(msg='Relevant hotfix is not installed on Check Point server. See sk114661 on Check Point Support Center.') if module.params['state'] == 'present': if equals_code == 200: