__generate_randomheader uses now string
This patch converts the string to bytes to use crc32. We can remore the fffffff because in python3 is always positive value. In other patch.
This commit is contained in:
@ -373,7 +373,7 @@ class IMAPFolder(BaseFolder):
|
||||
|
||||
# Compute unsigned crc32 of 'content' as unique hash.
|
||||
# NB: crc32 returns unsigned only starting with python 3.0.
|
||||
headervalue = str(binascii.crc32(content) & 0xffffffff) + '-'
|
||||
headervalue = str(binascii.crc32(str.encode(content)) & 0xffffffff) + '-'
|
||||
headervalue += str(self.randomgenerator.randint(0, 9999999999))
|
||||
return headername, headervalue
|
||||
|
||||
|
Reference in New Issue
Block a user