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

Unified Diff: native_client_sdk/src/build_tools/build_app.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 | « no previous file | native_client_sdk/src/build_tools/build_projects.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/build_app.py
diff --git a/native_client_sdk/src/build_tools/build_app.py b/native_client_sdk/src/build_tools/build_app.py
index 61dd1d9dc60b53d84e35007c7bea3b617755113f..0c406c0e3ddecf4763c424559696e68ada0932a4 100755
--- a/native_client_sdk/src/build_tools/build_app.py
+++ b/native_client_sdk/src/build_tools/build_app.py
@@ -3,8 +3,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import argparse
import json
-import optparse
import os
import re
import sys
@@ -77,8 +77,8 @@ def GetStrip(pepperdir, platform, arch, toolchain):
def main(args):
- parser = optparse.OptionParser()
- parser.add_option('-c', '--channel',
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-c', '--channel',
help='Channel to display in the name of the package.')
# To setup bash completion for this command first install optcomplete
@@ -90,7 +90,7 @@ def main(args):
except ImportError:
pass
- options, args = parser.parse_args(args)
+ options = parser.parse_args(args)
if options.channel:
if options.channel not in ('Dev', 'Beta'):
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/build_projects.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698