Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2747b2f

Browse files
committed
Merge: Fix the return value of BZ2File._read_block() to be consistent with comments.
2 parents 1e0a88a + 9e2a28e commit 2747b2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/bz2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def _read_block(self, n, return_data=True):
226226
data = self._buffer[self._buffer_offset : end]
227227
self._buffer_offset = end
228228
self._pos += len(data)
229-
return data
229+
return data if return_data else None
230230

231231
# The loop assumes that _buffer_offset is 0. Ensure that this is true.
232232
self._buffer = self._buffer[self._buffer_offset:]

0 commit comments

Comments
 (0)