changeset 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 778d947f222e
children 0970ebec29b4
files tests/tinyproxy.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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: