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

Unified Diff: native_client_sdk/src/tools/fix_manifest.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/tools/fix_manifest.py
diff --git a/native_client_sdk/src/tools/fix_manifest.py b/native_client_sdk/src/tools/fix_manifest.py
index c9b892f589c421542dadf797f022cd39de64e3ad..8f18825a71963985505b6c554e5dae1471d74abb 100755
--- a/native_client_sdk/src/tools/fix_manifest.py
+++ b/native_client_sdk/src/tools/fix_manifest.py
@@ -36,7 +36,7 @@ Becomes
import collections
import json
-import optparse
+import argparse
binji 2014/11/13 23:57:03 sort
Sam Clegg 2014/11/30 17:55:12 Done.
import os
import sys
@@ -58,14 +58,14 @@ Trace.verbose = False
def main(argv):
- parser = optparse.OptionParser(
+ parser = argparse.ArgumentParser(
usage='Usage: %prog [options] manifest.json', description=__doc__)
binji 2014/11/13 23:57:03 remove usage
Sam Clegg 2014/11/30 17:55:13 Done.
- parser.add_option('-p', '--prefix',
+ parser.add_argument('-p', '--prefix',
help='Prefix to set for all sub_package_paths in the '
'manifest. If none is specified, the prefix will be '
'removed; i.e. the start of the path will be '
'"_platform_specific/..."')
- parser.add_option('-v', '--verbose',
+ parser.add_argument('-v', '--verbose',
help='Verbose output', action='store_true')
options, args = parser.parse_args(argv)
binji 2014/11/13 23:57:03 options =
Sam Clegg 2014/11/30 17:55:13 Done.

Powered by Google App Engine
This is Rietveld 408576698