From: Nadeem Vawda Date: Sun, 30 Sep 2012 11:41:29 +0000 (+0200) Subject: Fix the return value of BZ2File._read_block() to be consistent with comments. X-Git-Tag: v3.4.0a1~2447^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e2a28ea54107e0f9c91ae3094974a310d0da027;p=thirdparty%2FPython%2Fcpython.git Fix the return value of BZ2File._read_block() to be consistent with comments. --- diff --git a/Lib/bz2.py b/Lib/bz2.py index 61d989bcacea..fe4118f9a7a2 100644 --- a/Lib/bz2.py +++ b/Lib/bz2.py @@ -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:]