From 14fedcfb8d4819de801ddb6451b4369a85e04067 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Tue, 17 Jun 2025 15:46:16 +0200 Subject: [PATCH] ci_run_n_monitor: fix padding in links 8f557b84f662cfb1c1fb was done because `text` is sometimes just an int, but the fix was only applies to the padding calculation. Unfortunately, the padding direction is also different between strings and integers, which means the behaviour is now incoherent. Let's convert `text` to a string before we start doing anything so that everything afterwards is coherent. Fixes: 8f557b84f662cfb1c1fb ("ci: crnm: fix hyperlink format") Part-of: --- bin/ci/ci_run_n_monitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/ci/ci_run_n_monitor.py b/bin/ci/ci_run_n_monitor.py index 094929c9c90..96da644998f 100755 --- a/bin/ci/ci_run_n_monitor.py +++ b/bin/ci/ci_run_n_monitor.py @@ -611,7 +611,8 @@ def __job_duration_record(dict_item: tuple) -> str: def link2print(url: str, text: str, text_pad: int = 0) -> str: - text_pad = len(str(text)) if text_pad < 1 else text_pad + text = str(text) + text_pad = len(text) if text_pad < 1 else text_pad return f"{URL_START}{url}\a{text:{text_pad}}{URL_END}"