tests/tinyproxy.py
changeset 14971 0b21ae0a2366
parent 14494 1ffeeb91c55d
child 16300 74e114ac6ec1
--- a/tests/tinyproxy.py	Mon Jul 25 16:05:01 2011 -0500
+++ b/tests/tinyproxy.py	Mon Jul 25 16:37:18 2011 -0500
@@ -23,7 +23,8 @@
 
     def handle(self):
         (ip, port) =  self.client_address
-        if hasattr(self, 'allowed_clients') and ip not in self.allowed_clients:
+        allowed = getattr(self, 'allowed_clients', None)
+        if allowed is not None and ip not in allowed:
             self.raw_requestline = self.rfile.readline()
             if self.parse_request():
                 self.send_error(403)