From 3d4ceb2aeecfa9eb8813252516ae80cffb740a7b Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Mon, 15 May 2023 19:39:00 -0300 Subject: [PATCH] ci/lava: Bypass arg list to print_log function Signed-off-by: Guilherme Gallo Part-of: --- .gitlab-ci/lava/utils/log_follower.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci/lava/utils/log_follower.py b/.gitlab-ci/lava/utils/log_follower.py index 325224d8f19..d047bfd82af 100644 --- a/.gitlab-ci/lava/utils/log_follower.py +++ b/.gitlab-ci/lava/utils/log_follower.py @@ -279,16 +279,14 @@ def fix_lava_gitlab_section_log(): -def print_log(msg: str) -> None: +def print_log(msg: str, *args) -> None: # Reset color from timestamp, since `msg` can tint the terminal color - print(f"{CONSOLE_LOG['RESET']}{datetime.now()}: {msg}") + print(f"{CONSOLE_LOG['RESET']}{datetime.now()}: {msg}", *args) def fatal_err(msg, exception=None): colored_msg = f"{CONSOLE_LOG['FG_RED']}" - f"{msg}" - f"{CONSOLE_LOG['RESET']}" - print_log(colored_msg) + print_log(colored_msg, f"{msg}", f"{CONSOLE_LOG['RESET']}") if exception: raise exception sys.exit(1)