Skip to content

Commit

Permalink
[IMPR] remove previous error traceback when raising Error in authorsh…
Browse files Browse the repository at this point in the history
…ip()

Change-Id: Ib9d4ba89932c2cfc831c63b33230057d4dd9f179
  • Loading branch information
xqt committed Jul 13, 2024
1 parent 4c9357f commit 9fd19f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pywikibot/page/_toolforge.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ def authorship(
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():
Expand Down

0 comments on commit 9fd19f1

Please sign in to comment.