http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9011
Revision: 9011 Author: xqt Date: 2011-02-25 16:08:06 +0000 (Fri, 25 Feb 2011) Log Message: ----------- -savenew should override a file whereas -save appends the output. Bugfix requested by Bin?\195?\161ris.
Modified Paths: -------------- trunk/pywikipedia/replace.py
Modified: trunk/pywikipedia/replace.py =================================================================== --- trunk/pywikipedia/replace.py 2011-02-25 15:10:25 UTC (rev 9010) +++ trunk/pywikipedia/replace.py 2011-02-25 16:08:06 UTC (rev 9011) @@ -648,13 +648,13 @@ else: PageTitles.append(arg[6:]) elif arg.startswith('-savenew'): + append = False if len(arg) == 8: filename = pywikibot.input( u'Please enter the filename to save the titles \n(will be deleted if exists):') else: filename = arg[9:] elif arg.startswith('-save'): - append = False if len(arg) == 5: filename = pywikibot.input( u'Please enter the filename to save the titles:')
pywikipedia-svn@lists.wikimedia.org