jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/390777 )
Change subject: [bugfix] keeping categories from non-english sites
......................................................................
[bugfix] keeping categories from non-english sites
Adds the site for the text on the call to textlib.getCategoryLinks
to keep categories already in the page when using CategoryAddBot
(ammend for negliting to type a self.)
Bug: T180289
Change-Id: I361a17a82931b09a7a8659d02b9a5eea21802c46
---
M scripts/category.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
Zoranzoki21: Looks good to me, but someone else must approve
diff --git a/scripts/category.py b/scripts/category.py
index c244114..263b92d 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -362,7 +362,7 @@
return
# store old text, so we don't have reload it every time
old_text = text
- cats = textlib.getCategoryLinks(text)
+ cats = textlib.getCategoryLinks(text, self.current_page.site)
pywikibot.output(u"Current categories:")
for cat in cats:
pywikibot.output(u"* %s" % cat.title())
--
To view, visit
https://gerrit.wikimedia.org/r/390777
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I361a17a82931b09a7a8659d02b9a5eea21802c46
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Chico Venancio <chicocvenancio(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>