bin/ci: crnm: Improve timer display formatting

Modify the pretty_wait function to use a two-digit width for seconds
display, ensuring consistent and aligned output when showing the
countdown timer.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
This commit is contained in:
Guilherme Gallo 2025-02-27 16:09:29 -03:00 committed by Marge Bot
parent 769c9bf27c
commit b3a9125014

View file

@ -107,7 +107,7 @@ def job_duration(job: gitlab.v4.objects.ProjectPipelineJob) -> float:
def pretty_wait(sec: int) -> None:
"""shows progressbar in dots"""
for val in range(sec, 0, -1):
print(f"{val} seconds", end="\r") # U+23F2 Timer clock
print(f"{val:2d} seconds", end="\r") # U+23F2 Timer clock
time.sleep(1)