Skip to content
This repository was archived by the owner on Mar 23, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion warc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _read(self, size):
self.buf = self.buf[size:]
else:
size = min(size, self.length - self.offset - len(self.buf))
content = self.buf + self.fileobj.read(size)
content = self.buf + str(self.fileobj.read(size))
self.buf = ""
self.offset += len(content)
return content
Expand Down
4 changes: 2 additions & 2 deletions warc/warc.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ def finish_reading_current_record(self):
if self.current_payload:
# consume all data from the current_payload before moving to next record
self.current_payload.read()
self.expect(self.current_payload.fileobj, "\r\n")
self.expect(self.current_payload.fileobj, "\r\n")
self.expect(self.current_payload.fileobj, b"\r\n")
self.expect(self.current_payload.fileobj, b"\r\n")
self.current_payload = None

def read_record(self):
Expand Down