__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:
parent
7980f7ff1a
commit
ea8c0c6f3e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user