jenkins-bot has submitted this change and it was merged.
Change subject: replace.py: fix handling of addedCat, again
......................................................................
replace.py: fix handling of addedCat, again
In ReplaceRobot, with addedCat set, get categories from the new
wikitext, otherwise old categories might be added back.
Change-Id: Ie7c19d0517882e465183cc7982af7f3c5f733bf6
---
M scripts/replace.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/replace.py b/scripts/replace.py
index 2aa2d34..73c73aa 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -602,7 +602,7 @@
if hasattr(self, 'addedCat'):
# Fetch only categories in wikitext, otherwise the others will
# be explicitly added.
- cats = textlib.getCategoryLinks(original_text)
+ cats = textlib.getCategoryLinks(new_text)
if self.addedCat not in cats:
cats.append(self.addedCat)
new_text = textlib.replaceCategoryLinks(new_text,
--
To view, visit
https://gerrit.wikimedia.org/r/214805
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7c19d0517882e465183cc7982af7f3c5f733bf6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>