jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] Don't break redirect.py for InterwikiRedirectPage exception ......................................................................
[bugfix] Don't break redirect.py for InterwikiRedirectPage exception
Bug: T128283 Change-Id: Ib69f9fc8add170dfcc606b5cfed25ad097332505 --- M scripts/redirect.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/redirect.py b/scripts/redirect.py index edfa28d..678a0e5 100755 --- a/scripts/redirect.py +++ b/scripts/redirect.py @@ -71,8 +71,8 @@ # # (C) Daniel Herding, 2004 # (C) Purodha Blissenbach, 2009 -# (C) xqt, 2009-2015 -# (C) Pywikibot team, 2004-2015 +# (C) xqt, 2009-2016 +# (C) Pywikibot team, 2004-2016 # # Distributed under the terms of the MIT license. # @@ -421,6 +421,8 @@ pywikibot.output(u'%s doesn't exist.' % redir_page.title()) except pywikibot.InvalidTitle: pywikibot.exception() + except pywikibot.InterwikiRedirectPage: + pywikibot.output('%s is on another site.' % redir_page.title()) else: try: targetPage.get()
pywikibot-commits@lists.wikimedia.org