Chromium Code Reviews| Index: native_client_sdk/src/tools/httpd.py |
| diff --git a/native_client_sdk/src/tools/httpd.py b/native_client_sdk/src/tools/httpd.py |
| index 4fcb89a685c5bc59c923808fe613f97427b9d319..258e5296b1f212d348ff72411ce10e6123f16d9a 100755 |
| --- a/native_client_sdk/src/tools/httpd.py |
| +++ b/native_client_sdk/src/tools/httpd.py |
| @@ -6,7 +6,7 @@ |
| import BaseHTTPServer |
| import logging |
| import multiprocessing |
| -import optparse |
| +import argparse |
|
binji
2014/11/13 23:57:04
sort
Sam Clegg
2014/11/30 17:55:13
Done.
|
| import os |
| import SimpleHTTPServer # pylint: disable=W0611 |
| import socket |
| @@ -185,13 +185,13 @@ def _HTTPServerProcess(conn, dirname, port, server_kwargs): |
| def main(args): |
| - parser = optparse.OptionParser() |
| - parser.add_option('-C', '--serve-dir', |
| + parser = argparse.ArgumentParser() |
| + parser.add_argument('-C', '--serve-dir', |
| help='Serve files out of this directory.', |
| default=os.path.abspath('.')) |
| - parser.add_option('-p', '--port', |
| + parser.add_argument('-p', '--port', |
| help='Run server on this port.', default=5103) |
| - parser.add_option('--no-dir-check', '--no_dir_check', |
| + parser.add_argument('--no-dir-check', '--no_dir_check', |
| help='No check to ensure serving from safe directory.', |
| dest='do_safe_check', action='store_false', default=True) |