Mpaa has uploaded a new change for review. https://gerrit.wikimedia.org/r/157292
Change subject: category.py: consider also files, not only pages ...................................................................... category.py: consider also files, not only pages In CategoryTidyRobot(), a category is considered empty only if no pages are present, while number of files is not considered. This patch fixes it. Change-Id: I1a340e2337d44caeedd435a40160736ea943d7cb --- M scripts/category.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/92/157292/1 diff --git a/scripts/category.py b/scripts/category.py index fa7a3ea..117df55 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -887,8 +887,8 @@ def run(self): cat = pywikibot.Category(self.site, self.catTitle) - if cat.categoryinfo['pages'] == 0: - pywikibot.output(u'There are no articles in category %s' + if cat.categoryinfo['pages'] == 0 and cat.categoryinfo['files'] == 0: + pywikibot.output(u'There are no articles or files in category %s' % self.catTitle) else: preloadingGen = pagegenerators.PreloadingGenerator(cat.articles()) -- To view, visit https://gerrit.wikimedia.org/r/157292 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a340e2337d44caeedd435a40160736ea943d7cb Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mpaa <mpaa.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits