[yocto-autobuilder2][PATCH] reporters/swatbot: sanitize urls


Alexandre Belloni
 

When the log name contains a space, the generated URL is not correct. Thi=
s
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@...>
---

This is untested because I don't have the setup handy but, I hope, it is
trivial enough to work properly


reporters/swatbot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/reporters/swatbot.py b/reporters/swatbot.py
index 4a5a04eb1809..41ae762359a0 100644
--- a/reporters/swatbot.py
+++ b/reporters/swatbot.py
@@ -202,7 +202,7 @@ class SwatBotURI(object):
logs =3D list(logs)
urls =3D []
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 =3D " ".join(urls)
else:
--=20
2.31.1

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.