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

This commit is contained in:
Nadeem Vawda 2012-09-30 13:41:29 +02:00
parent 28714c8c26
commit 9e2a28ea54
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ class BZ2File(io.BufferedIOBase):
data = self._buffer[self._buffer_offset : end]
self._buffer_offset = end
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.
self._buffer = self._buffer[self._buffer_offset:]