Message244235
Actually, looking closer at the module, perhaps you just need to set the errorlevel=1 option:
>>> with tarfile.open("truncated.tar", errorlevel=1) as tar:... tar.extractall("test-dir")
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/home/proj/python/cpython/Lib/tarfile.py", line 1996, in extractall
numeric_owner=numeric_owner)
File "/home/proj/python/cpython/Lib/tarfile.py", line 2038, in extract
numeric_owner=numeric_owner)
File "/home/proj/python/cpython/Lib/tarfile.py", line 2108, in _extract_member
self.makefile(tarinfo, targetpath)
File "/home/proj/python/cpython/Lib/tarfile.py", line 2154, in makefile
copyfileobj(source, target, tarinfo.size)
File "/home/proj/python/cpython/Lib/tarfile.py", line 242, in copyfileobj
raise OSError("end of file reached")
OSError: end of file reached |
|
Date |
User |
Action |
Args |
2015-05-28 01:08:19 | martin.panter | set | recipients:
+ martin.panter, guettli, lars.gustaebel, ethan.furman, Thomas Güttler |
2015-05-28 01:08:19 | martin.panter | set | messageid: <1432775299.28.0.0122708517032.issue24259@psf.upfronthosting.co.za> |
2015-05-28 01:08:19 | martin.panter | link | issue24259 messages |
2015-05-28 01:08:19 | martin.panter | create | |
|