Index: native_client_sdk/src/build_tools/update_nacl_manifest.py |
diff --git a/native_client_sdk/src/build_tools/update_nacl_manifest.py b/native_client_sdk/src/build_tools/update_nacl_manifest.py |
index c93198bc19de360e664778c50c735fa2bfaaf68e..d60f0983fb2c06062499f3d389d53d117ae0f473 100755 |
--- a/native_client_sdk/src/build_tools/update_nacl_manifest.py |
+++ b/native_client_sdk/src/build_tools/update_nacl_manifest.py |
@@ -10,6 +10,7 @@ in manifest. |
# pylint is convinced the email module is missing attributes |
# pylint: disable=E1101 |
+import argparse |
import buildbot_common |
import csv |
import cStringIO |
@@ -18,7 +19,6 @@ import email |
import logging |
import logging.handlers |
import manifest_util |
-import optparse |
import os |
import posixpath |
import re |
@@ -879,24 +879,25 @@ class CapturedFile(object): |
def main(args): |
- parser = optparse.OptionParser() |
- parser.add_option('--gsutil', help='path to gsutil.') |
- parser.add_option('-d', '--debug', help='run in debug mode.', |
+ parser = argparse.ArgumentParser() |
+ parser.add_argument('--gsutil', help='path to gsutil.') |
+ parser.add_argument('-d', '--debug', help='run in debug mode.', |
action='store_true') |
- parser.add_option('--mailfrom', help='email address of sender.') |
- parser.add_option('--mailto', help='send error mails to...', action='append') |
- parser.add_option('-n', '--dryrun', help="don't upload the manifest.", |
+ parser.add_argument('--mailfrom', help='email address of sender.') |
+ parser.add_argument('--mailto', help='send error mails to...', |
+ action='append') |
+ parser.add_argument('-n', '--dryrun', help="don't upload the manifest.", |
action='store_true') |
- parser.add_option('-v', '--verbose', help='print more diagnotic messages. ' |
+ parser.add_argument('-v', '--verbose', help='print more diagnotic messages. ' |
'Use more than once for more info.', |
action='count') |
- parser.add_option('--log-file', metavar='FILE', help='log to FILE') |
- parser.add_option('--upload-log', help='Upload log alongside the manifest.', |
- action='store_true') |
- parser.add_option('--bundle-version', |
+ parser.add_argument('--log-file', metavar='FILE', help='log to FILE') |
+ parser.add_argument('--upload-log', help='Upload log alongside the manifest.', |
+ action='store_true') |
+ parser.add_argument('--bundle-version', |
help='Manually set a bundle version. This can be passed more than once. ' |
'format: --bundle-version pepper_24=24.0.1312.25', action='append') |
- options, args = parser.parse_args(args) |
+ options = parser.parse_args(args) |
if (options.mailfrom is None) != (not options.mailto): |
options.mailfrom = None |