jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] Skip InterwikiRedirectPage ......................................................................
[bugfix] Skip InterwikiRedirectPage
Skip InterwikiRedirectPage exception. Since the exception does not return a valid Page for the redirect target, the target handling is obsolete.
bug: T85693 Change-Id: I6d9cdeb1b17c0c7957fdfb75e373ed9290b1cfb0 --- M scripts/redirect.py 1 file changed, 2 insertions(+), 7 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/redirect.py b/scripts/redirect.py index e254e0c..2fa2c83 100755 --- a/scripts/redirect.py +++ b/scripts/redirect.py @@ -551,7 +551,8 @@ pywikibot.warning( u"Redirect target section %s doesn't exist." % newRedir.title(asLink=True)) - except pywikibot.CircularRedirect as e: + except (pywikibot.CircularRedirect, + pywikibot.InterwikiRedirectPage) as e: pywikibot.exception(e) pywikibot.output(u"Skipping %s." % newRedir) break @@ -584,12 +585,6 @@ pywikibot.output( u' Links to: %s.' % targetPage.title(asLink=True)) - if targetPage.site != self.site: - pywikibot.warning( - u'redirect target (%s) is on a different site.' - % targetPage.title(asLink=True)) - if self.getOption('always'): - break # skip if automatic try: mw_msg = targetPage.site.mediawiki_message( 'wikieditor-toolbar-tool-redirect-example')