Ronald Oussoren added the comment:

The actual exception you're getting is IMHO a bug, it should have been a 
zipfile.BadZipfile exception.

That said, it might be useful to teach zipfile to optionally be a little more 
forgiving about errors like this when reading a zipfile. I'm at best -0 on that 
in general, in this case we could get away with restructuring the code a 
little: a number of ZipInfo attributes are set from "extra" data when the extra 
data is present and the value in the normal header max-ed out. The code could 
be changed to not even try to decode the "extra" data when the values in the 
normal header aren't max-ed out.

BTW. The RuntimeError that's raised in _decodeExtra should also be a BadZipfile 
exception.

----------
nosy: +alanmcintyre, ronaldoussoren, serhiy.storchaka, twouters

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24686>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to