--- globals.py 2008-04-01 16:25:52.000000000 +0100 +++ _globals.py 2008-04-01 16:55:47.000000000 +0100 @@ -140,7 +140,7 @@ def hashFile(name): try: - longlongformat = 'LL' # signed long, unsigned long + longlongformat = 'q' # signed long, unsigned long bytesize = struct.calcsize(longlongformat) f = file(name, "rb") @@ -148,24 +148,20 @@ filesize = os.path.getsize(name) hash = filesize - #print struct.calcsize(longlongformat) if filesize < 65536 * 2: return "SizeError" for x in range(65536/bytesize): buffer = f.read(bytesize) - (l2, l1)= struct.unpack(longlongformat, buffer) - l_value = (long(l1) << 32) | long(l2) + (l_value,)= struct.unpack(longlongformat, buffer) hash += l_value hash = hash & 0xFFFFFFFFFFFFFFFF #to remain as 64bit number - #if x < 20 : print "%016x" % hash f.seek(max(0,filesize-65536),0) for x in range(65536/bytesize): buffer = f.read(bytesize) - (l2, l1) = struct.unpack(longlongformat, buffer) - l_value = (long(l1) << 32) | long(l2) + (l_value,)= struct.unpack(longlongformat, buffer) hash += l_value hash = hash & 0xFFFFFFFFFFFFFFFF