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

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 6 years, 1 month 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
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 374155d3f4baa7fe3331c704562f5aa16a4a070a..cc05044eb18c9b09ca6016a536fc0cc8d0e790b8 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:

Powered by Google App Engine
This is Rietveld 408576698