Kaydet (Commit) b4dc921e authored tarafından Lars Gustäbel's avatar Lars Gustäbel

Avoid EOFError being passed to the caller (restoring the

old behavior).
üst 7623294c
...@@ -597,7 +597,10 @@ class _BZ2Proxy(object): ...@@ -597,7 +597,10 @@ class _BZ2Proxy(object):
raw = self.fileobj.read(self.blocksize) raw = self.fileobj.read(self.blocksize)
if not raw: if not raw:
break break
data = self.bz2obj.decompress(raw) try:
data = self.bz2obj.decompress(raw)
except EOFError:
break
b.append(data) b.append(data)
x += len(data) x += len(data)
self.buf = "".join(b) self.buf = "".join(b)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment