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 abc0f518650bd0c2fe2bc776f5b608e3f0df8e66..2f00c911ea1d89e17373acd54fb8cf0a5ebbab8f 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[1:]) |
+ options = parser.parse_args(args) |
if options.channel: |
if options.channel not in ('Dev', 'Beta'): |
@@ -181,4 +181,4 @@ def main(args): |
if __name__ == '__main__': |
- sys.exit(main(sys.argv)) |
+ sys.exit(main(sys.argv[1:])) |