From 1c2ed2592912834073d3ab9c7d139abc2b04e346 Mon Sep 17 00:00:00 2001 From: Dmitriy Zayakin Date: Tue, 13 Aug 2024 10:09:28 +0300 Subject: [PATCH] [#280] Fix neo-go query height in steps Signed-off-by: Dmitriy Zayakin --- src/frostfs_testlib/steps/cli/object.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/frostfs_testlib/steps/cli/object.py b/src/frostfs_testlib/steps/cli/object.py index 72debc2..f28de06 100644 --- a/src/frostfs_testlib/steps/cli/object.py +++ b/src/frostfs_testlib/steps/cli/object.py @@ -690,11 +690,13 @@ def neo_go_query_height(shell: Shell, endpoint: str) -> dict: latest_block = first_line.split(":") # taking second line from command's output contain wallet key second_line = output.split("\n")[1] - validated_state = second_line.split(":") - return { - latest_block[0].replace(":", ""): int(latest_block[1]), - validated_state[0].replace(":", ""): int(validated_state[1]), - } + if second_line != "": + validated_state = second_line.split(":") + return { + latest_block[0].replace(":", ""): int(latest_block[1]), + validated_state[0].replace(":", ""): int(validated_state[1]), + } + return {latest_block[0].replace(":", ""): int(latest_block[1])} @wait_for_success()