[Pywikipedia-svn] SVN: [7272] branches/rewrite/scripts/imageuncat.py
russblau at svn.wikimedia.org
russblau at svn.wikimedia.org
Thu Sep 17 19:40:01 UTC 2009
Revision: 7272
Author: russblau
Date: 2009-09-17 19:40:01 +0000 (Thu, 17 Sep 2009)
Log Message:
-----------
two minor bug-fixes (use pywikibot.output() instead of print; and supply missing .title() call)
Modified Paths:
--------------
branches/rewrite/scripts/imageuncat.py
Modified: branches/rewrite/scripts/imageuncat.py
===================================================================
--- branches/rewrite/scripts/imageuncat.py 2009-09-17 18:33:18 UTC (rev 7271)
+++ branches/rewrite/scripts/imageuncat.py 2009-09-17 19:40:01 UTC (rev 7272)
@@ -1298,7 +1298,7 @@
for templateWithTrail in page.templates():
#Strip of trailing garbage
- template = templateWithTrail.rstrip('\n').rstrip()
+ template = templateWithTrail.title().rstrip('\n').rstrip()
if template in skipTemplates:
# Already tagged with a template, skip it
pywikibot.output(u'Already tagged, skip it')
@@ -1350,7 +1350,7 @@
else:
pregenerator = site.preloadpages(generator)
for page in pregenerator:
- print page.title()
+ pywikibot.output(page.title())
if page.exists() and (page.namespace() == 6) \
and (not page.isRedirectPage()) :
if isUncat(page):
More information about the Pywikipedia-svn
mailing list