[New-bugs-announce] [issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4
Sridhar Ratnakumar
report at bugs.python.org
Fri Aug 7 23:11:16 CEST 2009
New submission from Sridhar Ratnakumar <sridharr at activestate.com>:
Perhaps this must be wrapped under a programmer-expected custom
exception class (TarError maybe)
for tarinfo in tarfileobj.getmembers():
File "/home/apy/ActivePython-2.6/lib/python2.6/tarfile.py", line
1791, in getmembers
self._load() # all members, we first have to
File "/home/apy/ActivePython-2.6/lib/python2.6/tarfile.py", line
2352, in _load
tarinfo = self.next()
File "/home/apy/ActivePython-2.6/lib/python2.6/tarfile.py", line
2307, in next
self.fileobj.seek(self.offset)
File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 382, in
seek
self.read(1024)
File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 219, in
read
self._read(readsize)
File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 267, in
_read
self._read_eof()
File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 300, in
_read_eof
crc32 = read32(self.fileobj)
File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 24, in
read32
return struct.unpack("<I", input.read(4))[0]
error: unpack requires a string argument of length 4
----------
components: Library (Lib)
messages: 91412
nosy: srid
severity: normal
status: open
title: TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6669>
_______________________________________
More information about the New-bugs-announce
mailing list