http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10359
Revision: 10359 Author: drtrigon Date: 2012-06-13 12:58:26 +0000 (Wed, 13 Jun 2012) Log Message: ----------- improved parameter handling, added deprecated hint as follow-up to r10353 and r10354
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2012-06-13 12:29:02 UTC (rev 10358) +++ trunk/pywikipedia/wikipedia.py 2012-06-13 12:58:26 UTC (rev 10359) @@ -8092,7 +8092,7 @@ setLogfileStatus(True, arg[5:]) elif arg == '-nolog': setLogfileStatus(False) - elif arg == '-verbose' or arg == "-v": + elif arg in ['-verbose', '-v']: verbose += 1 elif arg == '-daemonize': import daemonize @@ -8100,11 +8100,14 @@ elif arg.startswith('-daemonize:'): import daemonize daemonize.daemonize(redirect_std = arg[11:]) - elif arg == '-cosmeticchanges' or arg == '-cc': + elif arg in ['-cosmeticchanges', '-cc']: config.cosmetic_changes = not config.cosmetic_changes output(u'NOTE: option cosmetic_changes is %s\n' % config.cosmetic_changes) - elif arg in ['-simulate', '-dry']: + elif arg == '-simulate': simulate = True + elif arg == '-dry': + output(u"Usage of -dry is deprecated; use -simulate instead.") + simulate = True # global debug option for development purposes. Normally does nothing. elif arg == '-debug': debug = True
pywikipedia-svn@lists.wikimedia.org