Marko Tuononen <marko.tuono...@gmail.com> added the comment:
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) $ ---------- Added file: https://bugs.python.org/file50411/tarfile_ut.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44899> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com