# HG changeset patch # User Yuya Nishihara # Date 2016-04-03 11:12:59 # Node ID 256d90bb12fa7b12bff1fef1e07073759f7a5115 # Parent 778d947f222e28d6f5e1c0fcebf9c189adb531d5 tests: make tinyproxy.py not import sys.argv by name diff --git a/tests/tinyproxy.py b/tests/tinyproxy.py --- a/tests/tinyproxy.py +++ b/tests/tinyproxy.py @@ -19,6 +19,7 @@ import SocketServer import os import select import socket +import sys import urlparse class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler): @@ -140,7 +141,7 @@ class ThreadingHTTPServer (SocketServer. a.close() if __name__ == '__main__': - from sys import argv + argv = sys.argv if argv[1:] and argv[1] in ('-h', '--help'): print(argv[0], "[port [allowed_client_name ...]]") else: