jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/693651 )
Change subject: fixing_redirects.py: Ignore ValueError ......................................................................
fixing_redirects.py: Ignore ValueError
Bug: T283403 Bug: T111513 Change-Id: Ic21cb6e0170734c653fbe9dafec7ea7fc25370ac --- M scripts/fixing_redirects.py 1 file changed, 7 insertions(+), 1 deletion(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/fixing_redirects.py b/scripts/fixing_redirects.py index 7cf01a8..f80e326 100755 --- a/scripts/fixing_redirects.py +++ b/scripts/fixing_redirects.py @@ -72,10 +72,16 @@ break # Make sure that next time around we will not find this same hit. curpos = m.start() + 1 + # T283403 + try: + is_interwikilink = mysite.isInterwikiLink(m.group('title')) + except ValueError: + pywikibot.exception() + continue # ignore interwiki links, links in the disabled area # and links to sections of the same page if (m.group('title').strip() == '' - or mysite.isInterwikiLink(m.group('title')) + or is_interwikilink or isDisabled(text, m.start())): continue actualLinkPage = pywikibot.Page(targetPage.site, m.group('title'))
pywikibot-commits@lists.wikimedia.org