jenkins-bot has submitted this change and it was merged.
Change subject: Fix solve_disambiguation
......................................................................
Fix solve_disambiguation
Currently solve_disambigation breaks frequently on English Wikipedia
pages. It is instantiating a Link object with links obtained from
a regex match of the page text, and assuming the Link object doesnt
raise exceptions after instantiation.
Force a Link.parse() on the link text to force errors to occur at the
beginning of processing so the error can be caught and link skipped.
Bug: T85057
Change-Id: I2c874080620a5c777f5bd192421d3fcaa920f219
---
M scripts/solve_disambiguation.py
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index 0374f5c..f6bf8bd 100644
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -626,6 +626,7 @@
try:
foundlink = pywikibot.Link(m.group('title'),
disambPage.site)
+ foundlink.parse()
except pywikibot.Error:
continue
# ignore interwiki links
--
To view, visit
https://gerrit.wikimedia.org/r/181249
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2c874080620a5c777f5bd192421d3fcaa920f219
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>