[Python-checkins] r61646 - python/trunk/Lib/gzip.py
gregory.p.smith
python-checkins at python.org
Wed Mar 19 23:23:51 CET 2008
Author: gregory.p.smith
Date: Wed Mar 19 23:23:51 2008
New Revision: 61646
Modified:
python/trunk/Lib/gzip.py
Log:
Improve the error message when the CRCs don't match.
Modified: python/trunk/Lib/gzip.py
==============================================================================
--- python/trunk/Lib/gzip.py (original)
+++ python/trunk/Lib/gzip.py Wed Mar 19 23:23:51 2008
@@ -316,7 +316,8 @@
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"
More information about the Python-checkins
mailing list