diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-05-04 05:17:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-04 05:17:47 (GMT) |
commit | 7e4db2f253c555568d56177c2fd083bcf8f88d34 (patch) | |
tree | aa2606f09d5b1095bb20573ed6b0be38ca4d6f33 /Lib/http/server.py | |
parent | 1c4670ea0cc3d208121af11b9b973e6bb268e570 (diff) | |
download | cpython-7e4db2f253c555568d56177c2fd083bcf8f88d34.zip cpython-7e4db2f253c555568d56177c2fd083bcf8f88d34.tar.gz cpython-7e4db2f253c555568d56177c2fd083bcf8f88d34.tar.bz2 |
bpo-30166: Import command-line parsing modules only when needed. (#1293)
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r-- | Lib/http/server.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py index 429490b..7b3e701 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -87,7 +87,6 @@ __all__ = [ "SimpleHTTPRequestHandler", "CGIHTTPRequestHandler", ] -import argparse import copy import datetime import email.utils @@ -1227,6 +1226,8 @@ def test(HandlerClass=BaseHTTPRequestHandler, sys.exit(0) if __name__ == '__main__': + import argparse + parser = argparse.ArgumentParser() parser.add_argument('--cgi', action='store_true', help='Run as CGI Server') |