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 <[email protected]>
Gerrit-Reviewer: Alex S.H. Lin <[email protected]>
Gerrit-Reviewer: DrTrigon <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Pyfisch <[email protected]>
Gerrit-Reviewer: Russell Blau <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits