Revision: 5080 Author: filnik Date: 2008-02-25 13:31:41 +0000 (Mon, 25 Feb 2008)
Log Message: ----------- In always mode don't show the change, only do them (otherwise the bot on toolserver will return errors)
Modified Paths: -------------- trunk/pywikipedia/blockpageschecker.py
Modified: trunk/pywikipedia/blockpageschecker.py =================================================================== --- trunk/pywikipedia/blockpageschecker.py 2008-02-24 18:53:01 UTC (rev 5079) +++ trunk/pywikipedia/blockpageschecker.py 2008-02-25 13:31:41 UTC (rev 5080) @@ -277,8 +277,9 @@ text = re.sub('(?:<noinclude>|)%s(?:</noinclude>|)' % replaceToPerform, '', text) if oldtext != text: # Ok, asking if the change has to be performed and do it. - wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title()) - wikipedia.showDiff(oldtext, text) + if always == True: + wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title()) + wikipedia.showDiff(oldtext, text) choice = '' while 1: if not always:
I have a problem with that fix, Filnik :)
We could (I could ?) implement a -silent option, but -alway and -silent should *not* be linked. Every scripts output diffs, even in -always mode. We could discuss that general implementation choice, but I don't see why this behavior should change in a particular script.
Also, your problem seems to be specific to the TS. Why don't you try fixing the problem on the TS instead of changing the general behavior of the script ? ;) [What happens if you try to pipe stdout and/or stderr in a logfile OR to /dev/null ?]
Cheers ! Nicolas.
pywikipedia-l@lists.wikimedia.org