1. James Mills
  2. circuits

Commits

James Mills  committed 80051f6

- circuits.web: Code cleanup

  • Participants
  • Parent commits 76eaa4c
  • Branches default

Comments (0)

Files changed (1)

File circuits/web/http.py

View file
     from StringIO import StringIO
 
 from circuits.net.sockets import Close, Write
-from circuits.core import handler, Component, Value, Timer
+from circuits.core import handler, Component, Value
 
 import wrappers
 from utils import quoted_slash
 
 DEFAULT_TIMEOUT = 3.0
 
+
 class HTTP(Component):
     """HTTP Protocol Component
 
 
     def disconnect(self, sock):
         if sock in self._clients:
-            request, response = self._clients[sock]
             del self._clients[sock]
 
     def read(self, sock, data):
             scheme, location, path, params, qs, frag = urlparse(path)
 
             protocol = tuple(map(int, protocol[5:].split(".")))
-            request = wrappers.Request(sock, method, scheme, path, protocol, qs)
+            request = wrappers.Request(sock, method, scheme, path,
+                    protocol, qs)
             response = wrappers.Response(request)
             self._clients[sock] = request, response