diff tests/tinyproxy.py @ 28778:256d90bb12fa

tests: make tinyproxy.py not import sys.argv by name
author Yuya Nishihara <yuya@tcha.org>
date Sun, 03 Apr 2016 20:12:59 +0900
parents 0023a6e1328f
children 80880ad3fccd
line wrap: on
line diff
--- a/tests/tinyproxy.py	Sun Apr 03 20:13:42 2016 +0900
+++ b/tests/tinyproxy.py	Sun Apr 03 20:12:59 2016 +0900
@@ -19,6 +19,7 @@
 import os
 import select
 import socket
+import sys
 import urlparse
 
 class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
@@ -140,7 +141,7 @@
         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: