Skip to content

Commit 89c4875

Browse files
kalutesV8 LUCI CQ
authored andcommitted
Fix format_duration
format_duration did not properly format hours and minutes. Add the necessary string format specifiers. Change-Id: Ied27e732f8ff7cd6ef6722c94d38ea0907cdee40 Reviewed-on: https://chromium-review.googlesource.com/c/crossbench/+/6660738 Reviewed-by: Camillo Bruni <[email protected]> Commit-Queue: Kameron Lutes <[email protected]>
1 parent 77308ff commit 89c4875

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crossbench/cli/ui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ def format_duration(duration: dt.timedelta) -> str:
7070

7171
formatted = f"{round(seconds, 1)}s"
7272
if minutes:
73-
formatted = "{minutes}m{formatted}"
73+
formatted = f"{minutes}m{formatted}"
7474
if hours:
75-
formatted = "{hours}h{formatted}"
75+
formatted = f"{hours}h{formatted}"
7676
return formatted
7777

7878

0 commit comments

Comments
 (0)