From fbbce19e7251c350dde8085392c76ccebe4e938d Mon Sep 17 00:00:00 2001 From: Popescu V <136721202+popescu-v@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:45:37 +0100 Subject: [PATCH] Use Python 3.8-compatible string suffix removal idiom --- test/LearningTestTool/py/_kht_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/LearningTestTool/py/_kht_utils.py b/test/LearningTestTool/py/_kht_utils.py index b6dca6d9..a0df36db 100644 --- a/test/LearningTestTool/py/_kht_utils.py +++ b/test/LearningTestTool/py/_kht_utils.py @@ -210,7 +210,9 @@ def extract_tool_exe_name(tool_full_exe_name): return tool_full_exe_name for suffix in kht.TOOL_MPI_SUFFIXES: if tool_full_exe_name.endswith(suffix): - return tool_full_exe_name.removesuffix(suffix) + # TODO: Replace with `return tool_full_exe_name.removesuffix(suffix)` + # as soon as Python 3.8 support is dropped + return tool_full_exe_name[:tool_full_exe_name.index(suffix)] """