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 srid
Recipients srid
Date 2009-07-18.03:05:24
SpamBayes Score 0.00025733074
Marked as misclassified No
Message-id <1247886325.93.0.371232374153.issue6511@psf.upfronthosting.co.za>
In-reply-to
Content
Ideally, zipfile.BadZipFile should be thrown when trying to open files 
that are zero-sized.

sridharr@whymac:/tmp/i > apy -c "import zipfile; zipfile.ZipFile
('empty.zip').extractall()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
zipfile.py", line 693, in __init__
    self._GetContents()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
zipfile.py", line 713, in _GetContents
    self._RealGetContents()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
zipfile.py", line 723, in _RealGetContents
    endrec = _EndRecData(fp)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
zipfile.py", line 189, in _EndRecData
    fpin.seek(-sizeEndCentDir, 2)
IOError: [Errno 22] Invalid argument
sridharr@whymac:/tmp/i >
History
Date User Action Args
2009-07-18 03:05:25sridsetrecipients: + srid
2009-07-18 03:05:25sridsetmessageid: <1247886325.93.0.371232374153.issue6511@psf.upfronthosting.co.za>
2009-07-18 03:05:24sridlinkissue6511 messages
2009-07-18 03:05:24sridcreate