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

Change subject: Category.py: upcast from Page to Category
......................................................................


Category.py: upcast from Page to Category

Instantiate directly a Category, instead of a Page with ns=14.

Change-Id: Iff7d591c0877140fa50c4a939e5430bf44c4d21b
---
M scripts/category.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mpaa: Looks good to me, but someone else must approve
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/category.py b/scripts/category.py
index 429fc8a..dc1bcdf 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -348,7 +348,7 @@
         newcat = self.newcat
         if not self.current_page.site.nocapitalize:
             newcat = newcat[:1].upper() + newcat[1:]
-        catpl = pywikibot.Page(self.current_page.site, newcat, ns=14)
+        catpl = pywikibot.Category(self.current_page.site, newcat)
         if catpl in cats:
             pywikibot.output(u"%s is already in %s."
                              % (self.current_page.title(), catpl.title()))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff7d591c0877140fa50c4a939e5430bf44c4d21b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to