mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
Avoid EOFError being passed to the caller (restoring the
old behavior).
This commit is contained in:
parent
7623294cb7
commit
b4dc921e30
1 changed files with 4 additions and 1 deletions
|
@ -597,7 +597,10 @@ class _BZ2Proxy(object):
|
|||
raw = self.fileobj.read(self.blocksize)
|
||||
if not raw:
|
||||
break
|
||||
try:
|
||||
data = self.bz2obj.decompress(raw)
|
||||
except EOFError:
|
||||
break
|
||||
b.append(data)
|
||||
x += len(data)
|
||||
self.buf = "".join(b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue