Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1115)

Unified Diff: native_client_sdk/src/build_tools/buildbot_run.py

Issue 720233003: [NaCl SDK] Convert python scripts from optparse to argparse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/build_tools/build_updater.py ('k') | native_client_sdk/src/build_tools/dsc2gyp.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/buildbot_run.py
diff --git a/native_client_sdk/src/build_tools/buildbot_run.py b/native_client_sdk/src/build_tools/buildbot_run.py
index 61b740ae4c14c1f5c3293c60f985a19e372427f9..5971a58c1647c36a2a851a979d4b0ba0bee38fc5 100755
--- a/native_client_sdk/src/build_tools/buildbot_run.py
+++ b/native_client_sdk/src/build_tools/buildbot_run.py
@@ -12,9 +12,9 @@ while being able to separately control excactly what the bots
run.
"""
+import argparse
import buildbot_common
import os
-import optparse
import subprocess
import sys
@@ -101,14 +101,14 @@ def main(args):
# orphaned .pyc files generated by a previous run.
os.environ['PYTHONDONTWRITEBYTECODE'] = '1'
- parser = optparse.OptionParser(description=__doc__)
- parser.add_option('--build-only', action='store_true',
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('--build-only', action='store_true',
help='Only build the SDK, don\'t build or run tests.')
- parser.add_option('--build-properties',
+ parser.add_argument('--build-properties',
help='JSON properties passed by buildbot. Currently ignored.')
- parser.add_option('--factory-properties',
+ parser.add_argument('--factory-properties',
help='JSON properties passed by buildbot. Currently ignored.')
- options, args = parser.parse_args(args)
+ options = parser.parse_args(args)
# Skip the testing phase if we are running on a build-only bots.
if not options.build_only:
« no previous file with comments | « native_client_sdk/src/build_tools/build_updater.py ('k') | native_client_sdk/src/build_tools/dsc2gyp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698