jenkins-bot has submitted this change and it was merged.
Change subject: archivebot.py: handle standard arguments ......................................................................
archivebot.py: handle standard arguments
Added a call of pywikibot.handleArgs to handle arguments such as -putthrottle:n.
Change-Id: I97b14b21f3c4c73183f85473926e0b204c4f1abd (cherry picked from commit a7443e63f5b4759e921f6574e8f1b2c7437494d8) --- M archivebot.py 1 file changed, 8 insertions(+), 2 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified Whym: Looks good to me, but someone else must approve
diff --git a/archivebot.py b/archivebot.py index b3c33b4..f5dd147 100644 --- a/archivebot.py +++ b/archivebot.py @@ -562,6 +562,12 @@
def main(): global Site, language + + import sys + my_args = [] + for arg in pywikibot.handleArgs(*sys.argv): + my_args.append(arg) + from optparse import OptionParser parser = OptionParser(usage='usage: %prog [options] [LINKPAGE(s)]') parser.add_option('-f', '--file', dest='filename', @@ -584,11 +590,11 @@ help='switch timezone to TIMEZONE', metavar='TIMEZONE') parser.add_option('-S', '--simulate', action='store_true', dest='simulate', help='Do not change pages, just simulate') - (options, args) = parser.parse_args() + (options, args) = parser.parse_args(args=my_args)
if options.locale: #Required for english month names - locale.setlocale(locale.LC_TIME, options.locale) + locale.setlocale(locale.LC_TIME, options.locale.encode('utf8'))
if options.timezone: os.environ['TZ'] = options.timezone