Skip to content

Commit 6e6a5ac

Browse files
authored
Merge pull request #56 from chkp-ameera/master
missing file change
2 parents cb56361 + 5f0a48b commit 6e6a5ac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/module_utils/checkpoint.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,11 @@ def chkp_api_call(module, api_call_object, has_add_api, ignore=None, show_params
270270
else: # some requests like static-route don't have add, try set instead
271271
code, res = api_call(module, target_version, api_call_object="set-{0}".format(api_call_object))
272272

273-
if code != 200:
273+
if code == 200:
274+
if 'wait_for_task' in module.params and module.params['wait_for_task'] is True:
275+
if 'task_id' in res:
276+
res = wait_for_task(module, target_version, res['task_id'])
277+
else:
274278
module.fail_json(msg=parse_fail_message(code, res))
275279

276280
after = res.copy()

0 commit comments

Comments
 (0)