jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/507840 )

Change subject: [IMPR] Rename addCommonscat method to treat_page
......................................................................

[IMPR] Rename addCommonscat method to treat_page

Change-Id: I00d6fcd63d1341e5416e80c0f434ad159b5828c7
---
M scripts/commonscat.py
1 file changed, 2 insertions(+), 6 deletions(-)

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



diff --git a/scripts/commonscat.py b/scripts/commonscat.py
index cfb50fc..3c63d92 100755
--- a/scripts/commonscat.py
+++ b/scripts/commonscat.py
@@ -239,10 +239,6 @@
             return True
         return super(CommonscatBot, self).skip_page(page)

-    def treat_page(self):
-        """Load the given page, do some changes, and save it."""
-        self.addCommonscat(self.current_page)
-
     def skipPage(self, page):
         """Determine if the page should be skipped."""
         if page.site.code in ignoreTemplates:
@@ -260,15 +256,15 @@
                             return True
         return False

-    def addCommonscat(self, page):
+    def treat_page(self):
         """
         Add CommonsCat template to page.

         Take a page. Go to all the interwiki page looking for a commonscat
         template. When all the interwiki's links are checked and a proper
         category is found add it to the page.
-
         """
+        page = self.current_page
         # Get the right templates for this page
         primaryCommonscat, commonscatAlternatives = i18n.translate(
             page.site.code, commonscatTemplates,

--
To view, visit https://gerrit.wikimedia.org/r/507840
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I00d6fcd63d1341e5416e80c0f434ad159b5828c7
Gerrit-Change-Number: 507840
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Dvorapa <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to