jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1326319?usp=email )
Change subject: category_redirect: Reuse formatted category links
......................................................................
category_redirect: Reuse formatted category links
Format source and destination category links once before processing members.
Reuse them for failed article and documentation-page moves.
Change-Id: I1f68261f66752a868c62adc197a1b490c9404c75
---
M scripts/category_redirect.py
1 file changed, 6 insertions(+), 4 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index fd60ea3..94b84a7 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -148,6 +148,8 @@
'newCatTitle': new_cat_title,
}
summary = edit_summary % param
+ old_cat_link = old_cat.title(as_link=True, textlink=True)
+ new_cat_link = new_cat.title(as_link=True, textlink=True)
# Move articles
found, moved = 0, 0
@@ -158,8 +160,8 @@
else:
self.edit_requests.append({
'title': article.title(as_link=True, textlink=True),
- 'oldcat': old_cat.title(as_link=True, textlink=True),
- 'newcat': new_cat.title(as_link=True, textlink=True)}
+ 'oldcat': old_cat_link,
+ 'newcat': new_cat_link}
)
if article.namespace() != 10:
@@ -179,8 +181,8 @@
else:
self.edit_requests.append({
'title': doc.title(as_link=True, textlink=True),
- 'oldcat': old_cat.title(as_link=True, textlink=True),
- 'newcat': new_cat.title(as_link=True, textlink=True)}
+ 'oldcat': old_cat_link,
+ 'newcat': new_cat_link}
)
if found:
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1326319?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: I1f68261f66752a868c62adc197a1b490c9404c75
Gerrit-Change-Number: 1326319
Gerrit-PatchSet: 2
Gerrit-Owner: Mahveotm <[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]