Rev 3701: Stop using U32, since it seems to be removed in python2.6 in http://bzr.arbash-meinel.com/branches/bzr/jam-integration
John Arbash Meinel
john at arbash-meinel.com
Fri Sep 12 20:25:06 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/jam-integration
------------------------------------------------------------
revno: 3701
revision-id: john at arbash-meinel.com-20080912192417-d1rwbfumdnslcpvr
parent: john at arbash-meinel.com-20080912191822-frogw0q4gn6dqfz9
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Fri 2008-09-12 14:24:17 -0500
message:
Stop using U32, since it seems to be removed in python2.6
-------------- next part --------------
=== modified file 'bzrlib/tuned_gzip.py'
--- a/bzrlib/tuned_gzip.py 2008-04-24 07:22:53 +0000
+++ b/bzrlib/tuned_gzip.py 2008-09-12 19:24:17 +0000
@@ -21,7 +21,7 @@
# make GzipFile faster:
import gzip
-from gzip import U32, LOWU32, FEXTRA, FCOMMENT, FNAME, FHCRC
+from gzip import LOWU32, FEXTRA, FCOMMENT, FNAME, FHCRC
import sys
import struct
import zlib
@@ -207,7 +207,8 @@
crc32, isize = struct.unpack("<LL", self._gzip_tail)
# note that isize is unsigned - it can exceed 2GB
if crc32 != U32(self.crc):
- raise IOError, "CRC check failed %d %d" % (crc32, U32(self.crc))
+ raise IOError, "CRC check failed %d %d" % (crc32,
+ self.crc & 0xFFFFFFFFL)
elif isize != LOWU32(self.size):
raise IOError, "Incorrect length of data produced"
More information about the bazaar-commits
mailing list