From d9474b9bc9c3d660db09303c2055937b1ae1205f Mon Sep 17 00:00:00 2001 From: Vlad K <113922484+vkarak1@users.noreply.github.com> Date: Mon, 26 Dec 2022 13:30:00 +0300 Subject: [PATCH] Revert "Fix: IndexError: list index out of range" This reverts commit 1dc45162586d112bf58a04d75143dc1d7ecf356c. --- robot/resources/lib/python_keywords/http_gate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/robot/resources/lib/python_keywords/http_gate.py b/robot/resources/lib/python_keywords/http_gate.py index 2aab4983..86f55e4f 100644 --- a/robot/resources/lib/python_keywords/http_gate.py +++ b/robot/resources/lib/python_keywords/http_gate.py @@ -286,10 +286,10 @@ def get_object_and_verify_hashes( nodes=nodes, ) # for some reason we can face with case when nodes_list is empty due to object resides in all nodes - if nodes_list: - random_node = random.choice(nodes_list) - else: + if nodes_list is None: random_node = random.choice(nodes) + else: + random_node = random.choice(nodes_list) object_getter = object_getter or get_via_http_gate