Revision: 8639 Author: xqt Date: 2010-10-10 02:15:03 +0000 (Sun, 10 Oct 2010)
Log Message: ----------- update from trunk r8638
Modified Paths: -------------- branches/rewrite/scripts/cosmetic_changes.py
Modified: branches/rewrite/scripts/cosmetic_changes.py =================================================================== --- branches/rewrite/scripts/cosmetic_changes.py 2010-10-10 02:06:55 UTC (rev 8638) +++ branches/rewrite/scripts/cosmetic_changes.py 2010-10-10 02:15:03 UTC (rev 8639) @@ -308,11 +308,7 @@ if not family.isDefinedNSLanguage(nsNumber, self.site.lang): # Skip undefined namespaces continue - if nsNumber == 6 and self.site.family.name == 'wikipedia' and \ - self.site.lang in ('en', 'fr'): - # skip processing file namespace on en-wiki and fr-wiki - continue - namespaces = list(family.namespace(self.site.lang, nsNumber, all = True)) + namespaces = list(family.namespace(self.site.lang, nsNumber, all=True)) thisNs = namespaces.pop(0) if nsNumber == 6 and family.name == 'wikipedia' and \ self.site.lang in ('en', 'fr'): @@ -755,17 +751,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