ci/lava: Bypass arg list to print_log function

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22870>
This commit is contained in:
Guilherme Gallo 2023-05-15 19:39:00 -03:00 committed by Marge Bot
parent 1fc40c081e
commit 3d4ceb2aee

View file

@ -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)