StatefulEncoder._buffer is a bytes object

This commit is contained in:
jesopo 2020-03-11 17:12:49 +00:00
parent 11834debff
commit 8630c63f46
1 changed files with 1 additions and 1 deletions

View File

@ -44,6 +44,6 @@ class StatefulEncoder(object):
self._buffered_lines.append(line)
def pop(self, byte_count: int):
sent = self._buffer[:byte_count].count("\n")
sent = self._buffer[:byte_count].count(b"\n")
self._buffer = self._buffer[byte_count:]
return [self._buffered_lines.pop(0) for _ in range(sent)]