jenkins-bot has submitted this change and it was merged.
Change subject: (bug 62248) Update from compat: Do not try to fix double redirects if the
redirect source is the redirect sample from the tool bar.
......................................................................
(bug 62248) Update from compat: Do not try to fix double redirects
if the redirect source is the redirect sample from the tool bar.
Change-Id: I29cfb72ffcbad0d61fb7ec6cd7c2dceee875eb71
---
M scripts/redirect.py
1 file changed, 7 insertions(+), 8 deletions(-)
Approvals:
Ladsgroup: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/redirect.py b/scripts/redirect.py
index c50da8d..2bfae04 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -601,20 +601,19 @@
pywikibot.output(
u' Links to: %s.'
% targetPage.title(asLink=True))
- if targetPage.site.sitename() == 'wikipedia:en':
- mw_msg = targetPage.site.mediawiki_message(
- 'wikieditor-toolbar-tool-redirect-example')
- if targetPage.title() == mw_msg:
- pywikibot.output(
- u"Skipping toolbar example: Redirect source is "
- u"potentially vandalized.")
- break
if targetPage.site != self.site:
pywikibot.warning(
u'redirect target (%s) is on a different site.'
% targetPage.title(asLink=True))
if self.always:
break # skip if automatic
+ mw_msg = targetPage.site.mediawiki_message(
+ 'wikieditor-toolbar-tool-redirect-example')
+ if targetPage.title() == mw_msg:
+ pywikibot.output(
+ u"Skipping toolbar example: Redirect source is "
+ u"potentially vandalized.")
+ break
# watch out for redirect loops
if redirList.count(u'%s:%s'
% (targetPage.site.lang,
--
To view, visit
https://gerrit.wikimedia.org/r/116934
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I29cfb72ffcbad0d61fb7ec6cd7c2dceee875eb71
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Alex S.H. Lin <alexsh(a)mail2000.com.tw>
Gerrit-Reviewer: DrTrigon <dr.trigon(a)surfeu.ch>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Pyfisch <pyfisch(a)gmail.com>
Gerrit-Reviewer: Russell Blau <russblau(a)imapmail.org>
Gerrit-Reviewer: jenkins-bot <>