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 <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexandre Belloni 2021-06-17 12:48:50 +02:00 committed by Richard Purdie
parent 0edf7860fe
commit 66d9d014a5

View File

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