1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 08:04:49 +01:00

minor fixes for py2 support

This commit is contained in:
Ilya Kreymer 2016-03-03 13:58:09 -08:00
parent 896f81fd1c
commit bdda1b8c03
2 changed files with 3 additions and 2 deletions

View File

@ -42,7 +42,7 @@ class RecordingStream(object):
self.recorder.write_response_buff(buff)
return res
def readline(self, maxlen=None):
def readline(self, maxlen=-1):
line = self.fp.readline(maxlen)
self.recorder.write_response_header_line(line)
return line

View File

@ -12,10 +12,11 @@ from io import BytesIO
from bottle import response
import uuid
import six
#=============================================================================
class StreamIter(object):
class StreamIter(six.Iterator):
def __init__(self, stream, header=None, size=8192):
self.stream = stream
self.header = header