Commit 9e2a28ea authored by Nadeem Vawda's avatar Nadeem Vawda

Fix the return value of BZ2File._read_block() to be consistent with comments.

parent 28714c8c
...@@ -226,7 +226,7 @@ class BZ2File(io.BufferedIOBase): ...@@ -226,7 +226,7 @@ class BZ2File(io.BufferedIOBase):
data = self._buffer[self._buffer_offset : end] data = self._buffer[self._buffer_offset : end]
self._buffer_offset = end self._buffer_offset = end
self._pos += len(data) self._pos += len(data)
return data return data if return_data else None
# The loop assumes that _buffer_offset is 0. Ensure that this is true. # The loop assumes that _buffer_offset is 0. Ensure that this is true.
self._buffer = self._buffer[self._buffer_offset:] self._buffer = self._buffer[self._buffer_offset:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment