jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] Rename addCommonscat method to treat_page

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

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 change 507840. To unsubscribe, or for help writing mail filters, visit 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 <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)