Revert "Fix: IndexError: list index out of range"

This reverts commit 1dc4516258.
This commit is contained in:
Vlad K 2022-12-26 13:30:00 +03:00
parent 1dc4516258
commit d9474b9bc9

View file

@ -286,10 +286,10 @@ def get_object_and_verify_hashes(
nodes=nodes, nodes=nodes,
) )
# for some reason we can face with case when nodes_list is empty due to object resides in all nodes # for some reason we can face with case when nodes_list is empty due to object resides in all nodes
if nodes_list: if nodes_list is None:
random_node = random.choice(nodes_list)
else:
random_node = random.choice(nodes) random_node = random.choice(nodes)
else:
random_node = random.choice(nodes_list)
object_getter = object_getter or get_via_http_gate object_getter = object_getter or get_via_http_gate