From ecd9681b650060b8412767a341b7a81bed9c99e3 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Fri, 8 Nov 2024 17:23:47 +0100 Subject: [PATCH] [FIX] runbot: properly join log args When a type error occurs when trying to format a message in a build log, the suspicious are are joined with the message. But as the args may be a tuple, an errors occurs when concatenating the message with the args during the join. With this commit, we ensure that the args are casted into a list. --- runbot/models/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/models/build.py b/runbot/models/build.py index 4328738e..159f2b30 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -996,7 +996,7 @@ class BuildResult(models.Model): message = message % args except TypeError: _logger.exception(f'Error while formating `{message}` with `{args}`') - message = ' ' .join([message] + args) + message = ' ' .join([message] + list(args)) message = truncate(message)