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:
pywikibot-commits@lists.wikimedia.org