jenkins-bot has submitted this change and it was merged.

Change subject: Use getCategoryLinks when renaming categories.
......................................................................


Use getCategoryLinks when renaming categories.

This allows us to skip categories included from translcuded templates. This is 
a potential fix for bug 58084.

Change-Id: I05fa90523f718f09de83d03aab3bd9d031e7cbbb
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index d5ac219..b18b875 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1494,7 +1494,7 @@
         # get list of Category objects the article is in and remove possible
         # duplicates
         cats = []
-        for cat in self.categories(get_redirect=True):
+        for cat in pywikibot.textlib.getCategoryLinks(self.text):
             if cat not in cats:
                 cats.append(cat)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/123434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I05fa90523f718f09de83d03aab3bd9d031e7cbbb
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Strainu <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to