jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1054020?usp=email )
Change subject: [IMPR] remove previous error traceback when raising Error in authorship() ......................................................................
[IMPR] remove previous error traceback when raising Error in authorship()
Change-Id: Ib9d4ba89932c2cfc831c63b33230057d4dd9f179 --- M pywikibot/page/_toolforge.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page/_toolforge.py b/pywikibot/page/_toolforge.py index 3342040..64152b1 100644 --- a/pywikibot/page/_toolforge.py +++ b/pywikibot/page/_toolforge.py @@ -194,8 +194,8 @@ table = wikitextparser.parse(r.text).tables[0] except IndexError: pattern = textlib.get_regexes('code')[0] - msg = pattern.search(r.text)[0] - raise pywikibot.exceptions.Error(textlib.removeHTMLParts(msg)) + msg = textlib.removeHTMLParts(pattern.search(r.text)[0]) + raise pywikibot.exceptions.Error(msg) from None
pct_sum = 0.0 for row in table.data():