Commits

Lars Gustäbel  committed ab38987

Avoid EOFError being passed to the caller (restoring the
old behavior).

  • Participants
  • Parent commits dd9fddb
  • Branches 2.5

Comments (0)

Files changed (1)

File Lib/tarfile.py

             raw = self.fileobj.read(self.blocksize)
             if not raw:
                 break
-            data = self.bz2obj.decompress(raw)
+            try:
+                data = self.bz2obj.decompress(raw)
+            except EOFError:
+                break
             b.append(data)
             x += len(data)
         self.buf = "".join(b)