http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10407
Revision: 10407 Author: xqt Date: 2012-06-21 22:51:37 +0000 (Thu, 21 Jun 2012) Log Message: ----------- use pywikibot.log for verbose_output
Modified Paths: -------------- branches/rewrite/scripts/cosmetic_changes.py
Modified: branches/rewrite/scripts/cosmetic_changes.py =================================================================== --- branches/rewrite/scripts/cosmetic_changes.py 2012-06-21 22:45:43 UTC (rev 10406) +++ branches/rewrite/scripts/cosmetic_changes.py 2012-06-21 22:51:37 UTC (rev 10407) @@ -196,9 +196,7 @@ try: text = isbn.hyphenateIsbnNumbers(text) except isbn.InvalidIsbnException, error: - if config.verbose_output: - pywikibot.output(u"ISBN error: %s" % error) - pass + pywikibot.log(u"ISBN error: %s" % error) if self.debug: pywikibot.showDiff(oldText, text) return text @@ -292,8 +290,6 @@ % star, re.I) found = regex.findall(starstext) if found != []: - if config.verbose_output: - print found text = regex.sub('', text) allstars += found
@@ -309,8 +305,6 @@ regex = re.compile(iw_reg) found = regex.findall(text) if found: - if config.verbose_output: - print found hasCommentLine = True text = regex.sub('', text)
@@ -339,8 +333,7 @@ allstars.sort() for element in allstars: text += '%s%s' % (element.strip(),config.line_separator) - if config.verbose_output: - pywikibot.output(u'%s' %element.strip()) + pywikibot.log(u'%s' %element.strip()) # Adding the interwiki if interwikiLinks: text = pywikibot.replaceLanguageLinks(text, interwikiLinks,
pywikipedia-svn@lists.wikimedia.org