jenkins-bot has submitted this change and it was merged.

Change subject: (bug 62248) Do not try to fix double redirects if the redirect 
source is the redirect sample from the tool bar.
......................................................................


(bug 62248) Do not try to fix double redirects if the redirect
source is the redirect sample from the tool bar.

Change-Id: I6f48d363c085ab60c6f9da89fd6bdf661c3427c3
---
M redirect.py
1 file changed, 7 insertions(+), 8 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/redirect.py b/redirect.py
index ba411e6..f75a352 100644
--- a/redirect.py
+++ b/redirect.py
@@ -595,20 +595,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/116933
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f48d363c085ab60c6f9da89fd6bdf661c3427c3
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Alex S.H. Lin <[email protected]>
Gerrit-Reviewer: DrTrigon <[email protected]>
Gerrit-Reviewer: Huji <[email protected]>
Gerrit-Reviewer: Ladsgroup <[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

Reply via email to