From 129280eb684c51283bd23d02477fff48c79e8b07 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 19 May 2018 17:59:59 +0200 Subject: [PATCH] openqabot: Quote the module name module names may contain # - especially if the module is loaded twice and openQA appends #1 and #2 --- oqamaint/openqabot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oqamaint/openqabot.py b/oqamaint/openqabot.py index 3a39e816..c87c900a 100644 --- a/oqamaint/openqabot.py +++ b/oqamaint/openqabot.py @@ -4,6 +4,7 @@ from datetime import date import md5 from pprint import pformat from urllib2 import HTTPError +from urllib import quote_plus from osclib.comments import CommentAPI import requests @@ -298,7 +299,7 @@ class OpenQABot(ReviewBot.ReviewBot): @staticmethod def get_step_url(testurl, modulename): - failurl = testurl + '/modules/{!s}/fails'.format(modulename) + failurl = testurl + '/modules/{!s}/fails'.format(quote_plus(modulename)) fails = requests.get(failurl).json() failed_step = fails.get('first_failed_step', 1) return "[{!s}]({!s}#step/{!s}/{:d})".format(OpenQABot.emd(modulename), testurl, modulename, failed_step)