http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10860
Revision: 10860 Author: xqt Date: 2013-01-03 07:45:46 +0000 (Thu, 03 Jan 2013) Log Message: ----------- make 'noredirect' more in line with it's name, patch bug #3599192 submitted by yfdyh000
Modified Paths: -------------- trunk/pywikipedia/movepages.py
Modified: trunk/pywikipedia/movepages.py =================================================================== --- trunk/pywikipedia/movepages.py 2013-01-03 07:38:28 UTC (rev 10859) +++ trunk/pywikipedia/movepages.py 2013-01-03 07:45:46 UTC (rev 10860) @@ -32,7 +32,7 @@ # # (C) Leonardo Gregianin, 2006 # (C) Andreas J. Schwab, 2007 -# (C) Pywikipedia bot team, 2006-2011 +# (C) Pywikipedia bot team, 2006-2013 # # Distributed under the terms of the MIT license. # @@ -77,7 +77,7 @@ summary): self.generator = generator self.addprefix = addprefix - self.noredirect = noredirect + self.leaveRedirect = not noredirect self.always = always self.skipredirects = skipredirects self.summary = summary @@ -91,7 +91,7 @@ % (page.title(asLink=True), newPageTitle)) page.move(newPageTitle, msg, throttle=True, - leaveRedirect=self.noredirect) + leaveRedirect=self.leaveRedirect) except pywikibot.NoPage: pywikibot.output(u'Page %s does not exist!' % page.title()) except pywikibot.IsRedirectPage: @@ -233,7 +233,7 @@ prefix = None oldName = None newName = None - noredirect = True + noredirect = False always = False skipredirects = False summary = None @@ -262,7 +262,7 @@ pywikibot.output( u'WARNING: file %s contains odd number of links' % filename) elif arg == '-noredirect': - noredirect = False + noredirect = True elif arg == '-always': always = True elif arg == '-skipredirects':
pywikipedia-svn@lists.wikimedia.org