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'))

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/693651
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ic21cb6e0170734c653fbe9dafec7ea7fc25370ac
Gerrit-Change-Number: 693651
Gerrit-PatchSet: 7
Gerrit-Owner: Meno25 <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to