Revision: 8638 Author: xqt Date: 2010-10-10 02:06:55 +0000 (Sun, 10 Oct 2010)
Log Message: ----------- fix for iter method of pagegenerators.PreloadingGenerator(): TypeError: 'NoneType'object is not iterable
Modified Paths: -------------- trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py =================================================================== --- trunk/pywikipedia/cosmetic_changes.py 2010-10-10 01:52:32 UTC (rev 8637) +++ trunk/pywikipedia/cosmetic_changes.py 2010-10-10 02:06:55 UTC (rev 8638) @@ -866,17 +866,17 @@ gen = genFactory.getCombinedGenerator() if not gen: pywikibot.showHelp() - elif not always: - answer = pywikibot.inputChoice( - warning + '\nDo you really want to continue?', - ['yes', 'no'], ['y', 'N'], 'N') + else: + if not always: + answer = pywikibot.inputChoice( + warning + '\nDo you really want to continue?', + ['yes', 'no'], ['y', 'N'], 'N') + if answer == 'y': + preloadingGen = pagegenerators.PreloadingGenerator(gen) + bot = CosmeticChangesBot(preloadingGen, acceptall=always, + comment=editSummary) + bot.run()
- if answer == 'y': - preloadingGen = pagegenerators.PreloadingGenerator(gen) - bot = CosmeticChangesBot(preloadingGen, acceptall=always, - comment=editSummary) - bot.run() - if __name__ == "__main__": try: main()
pywikipedia-svn@lists.wikimedia.org