fix other issues spotted by pyflakes.

This commit is contained in:
Benoit Chesneau 2010-01-21 22:40:53 +01:00
parent 036735b456
commit 99bb5b0de4
4 changed files with 3 additions and 4 deletions

View File

@ -142,7 +142,7 @@ class Arbiter(object):
except KeyboardInterrupt:
self.stop(False)
sys.exit(-1)
except Exception, e:
except Exception:
self.log.exception("Unhandled exception in main loop.")
self.stop(False)
sys.exit(-1)

View File

@ -138,7 +138,6 @@ class HttpParser(object):
return False
def read_chunk(self, data):
dlen = len(data)
if not self.start_offset:
i = data.find("\r\n")
if i != -1:

View File

@ -58,7 +58,6 @@ class HttpRequest(object):
def read(self):
environ = {}
headers = []
remain = CHUNK_SIZE
buf = ""
buf = read_partial(self.socket, CHUNK_SIZE)
i = self.parser.filter_headers(headers, buf)

View File

@ -93,7 +93,8 @@ class TeeInput(object):
return self.temp.readline(size)
return line
def readlines(self, sizehints=0):
def readlines(self, sizehint=0):
total = 0
lines = []
line = self.readline()
while line: