summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2012-09-30 11:45:22 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2012-09-30 11:45:22 (GMT)
commit2747b2f21e619cc0c944ecae4e5dfd2117c5a88d (patch)
treefc940f02c0ee0078b4f4c2781d1960568ab4f290 /Lib
parent1e0a88a11dbbc421fe4e71834a053eb143f9c698 (diff)
parent9e2a28ea54107e0f9c91ae3094974a310d0da027 (diff)
downloadcpython-2747b2f21e619cc0c944ecae4e5dfd2117c5a88d.zip
cpython-2747b2f21e619cc0c944ecae4e5dfd2117c5a88d.tar.gz
cpython-2747b2f21e619cc0c944ecae4e5dfd2117c5a88d.tar.bz2
Merge: Fix the return value of BZ2File._read_block() to be consistent with comments.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/bz2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/bz2.py b/Lib/bz2.py
index 61d989b..fe4118f 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:]