Currently the gzip module will raise a ValueError if the file was corrupt (bad crc or bad size), but this is IMHO bad because it means you can't substitute a GzipFile for a regular file without the risk of exceptions breaking out of the code. (And you don't want to catch ValueError since it might hide coding errors). The docs say ValueError is "Raised when a built-in operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError". I can't see how that applies to reading a corrupt file. IOError is probably the correct exception, because it is what code will already be looking for, and because even if technically there wasn't an actual io error, from the point of view of the code, trying to read a corrupt file is like an io error.