Kaydet (Commit) f15cde37 authored tarafından Gregory P. Smith's avatar Gregory P. Smith

Improve the error message when the CRCs don't match.

üst e7abf20c
......@@ -316,7 +316,8 @@ class GzipFile:
crc32 = read32(self.fileobj)
isize = U32(read32(self.fileobj)) # may exceed 2GB
if U32(crc32) != U32(self.crc):
raise IOError, "CRC check failed"
raise IOError("CRC check failed %s != %s" % (hex(U32(crc32)),
hex(U32(self.crc))))
elif isize != LOWU32(self.size):
raise IOError, "Incorrect length of data produced"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment