jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1155216?usp=email )

Change subject: [IMPR] Try another move to fix redirect targets
......................................................................

[IMPR] Try another move to fix redirect targets

Bug: T396473
Change-Id: I8c7ea36c3e02b38608cbba455de4b684b72d3e68
---
M scripts/redirect.py
1 file changed, 5 insertions(+), 3 deletions(-)

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




diff --git a/scripts/redirect.py b/scripts/redirect.py
index 27ae3b4..a382b4b 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -497,9 +497,11 @@

         if movedTarget:
             if not movedTarget.exists():
-                # FIXME: Test to another move
-                pywikibot.info(f'Target page {movedTarget} does not exist')
-            elif redir_page.namespace() != movedTarget.namespace():
+                self.fix_moved_broken_redirects(movedTarget)
+                # process other cases within recursive loop
+                return
+
+            if redir_page.namespace() != movedTarget.namespace():
                 pywikibot.info(f'Namespace of {redir_page} is different'
                                f'from target page {movedTarget}')
             elif redir_page == movedTarget:

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1155216?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8c7ea36c3e02b38608cbba455de4b684b72d3e68
Gerrit-Change-Number: 1155216
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to