This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author marko-tuononen
Recipients ethan.furman, marko-tuononen
Date 2021-10-29.13:20:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635513650.56.0.160625387208.issue44899@roundup.psfhosted.org>
In-reply-to
Content
Please find attached an example how to reproduce the problem in question.

$ python3 -m unittest tarfile_ut.py
E
======================================================================
ERROR: test_stat (tarfile_ut.TestClass)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.6/unittest/mock.py", line 1183, in patched
    return func(*args, **keywargs)
  File "/var/work/mtuonone/tarfile_ut.py", line 39, in test_stat
    tar.add(TEMP_FILENAME)
  File "/usr/lib64/python3.6/tarfile.py", line 1952, in add
    self.addfile(tarinfo, f)
  File "/usr/lib64/python3.6/tarfile.py", line 1980, in addfile
    copyfileobj(fileobj, self.fileobj, tarinfo.size, bufsize=bufsize)
  File "/usr/lib64/python3.6/tarfile.py", line 257, in copyfileobj
    raise exception("unexpected end of data")
OSError: unexpected end of data

----------------------------------------------------------------------
Ran 1 test in 0.006s

FAILED (errors=1)
$
History
Date User Action Args
2021-10-29 13:20:50marko-tuononensetrecipients: + marko-tuononen, ethan.furman
2021-10-29 13:20:50marko-tuononensetmessageid: <1635513650.56.0.160625387208.issue44899@roundup.psfhosted.org>
2021-10-29 13:20:50marko-tuononenlinkissue44899 messages
2021-10-29 13:20:50marko-tuononencreate