From 66d9d014a593b33a8fdcefbf16ec67c978466bf0 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 17 Jun 2021 12:48:50 +0200 Subject: [PATCH] reporters/swatbot: sanitize urls When the log name contains a space, the generated URL is not correct. This later also breaks parsing in swatbot. This was triggered by "property changes" and the correct URL is indeed logs/property_changes. Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- reporters/swatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reporters/swatbot.py b/reporters/swatbot.py index 4a5a04e..41ae762 100644 --- a/reporters/swatbot.py +++ b/reporters/swatbot.py @@ -202,7 +202,7 @@ class SwatBotURI(object): logs = list(logs) urls = [] for l in logs: - urls.append('%s/steps/%s/logs/%s' % (build['url'], step_number, l['name'])) + urls.append('%s/steps/%s/logs/%s' % (build['url'], step_number, l['name'].replace(" ", "_"))) if urls: urls = " ".join(urls) else: