Skip to content

Commit cb311da

Browse files
committed
Address review comments
1 parent e61bccf commit cb311da

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

Lib/tarfile.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,7 @@ def _read(self, size):
576576
t.append(dbuf)
577577
c += len(dbuf)
578578

579-
t = b"".join(t)
580-
if len(t) > size:
581-
# This would only happen if decompress() has a bug.
582-
raise ReadError("decompress() returned too much data")
583-
return t
579+
return b"".join(t)
584580

585581
def __read(self, size):
586582
"""Return size bytes from stream. If internal buffer is empty,

0 commit comments

Comments
 (0)