diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-10-01 21:04:11 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-10-01 21:04:11 (GMT) |
commit | 138ad5066d5e523eb81cabd4a05ed51d6664210d (patch) | |
tree | 64b9a4d64deb106726b9d4f9f6cbefc7aaafd55e /Lib/bz2.py | |
parent | 452add08a186a09f346a28306c96f4c89bf93c9e (diff) | |
download | cpython-138ad5066d5e523eb81cabd4a05ed51d6664210d.zip cpython-138ad5066d5e523eb81cabd4a05ed51d6664210d.tar.gz cpython-138ad5066d5e523eb81cabd4a05ed51d6664210d.tar.bz2 |
Fix error handling in new fast path of BZ2File.readline().
Diffstat (limited to 'Lib/bz2.py')
-rw-r--r-- | Lib/bz2.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -323,6 +323,7 @@ class BZ2File(io.BufferedIOBase): raise TypeError("Integer argument expected") size = size.__index__() with self._lock: + self._check_can_read() # Shortcut for the common case - the whole line is in the buffer. if size < 0: end = self._buffer.find(b"\n", self._buffer_offset) + 1 |