Serhiy Storchaka added the comment: Not all invalid gzip files raise BadGzipFile. Some of them raises ZlibError. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue6584> _______________________________________