Trying a different codec alias
@@ -123,7 +123,7 @@ def compute_checksum(checksum_type, args, csum=0):
elif checksum_type == ChecksumType.crc32:
for arg in args:
if isinstance(arg, str):
- arg = arg.encode('utf-8')
+ arg = arg.encode('utf8')
csum = zlib.crc32(arg, csum) & 0xffffffff
# TODO figure out farm32 cross platform issue
elif checksum_type == ChecksumType.farm32:
@@ -131,7 +131,7 @@ def compute_checksum(checksum_type, args, csum=0):
elif checksum_type == ChecksumType.crc32c:
for arg in args:
if isinstance(arg, str):
- arg = arg.encode('utf-8')
+ arg = arg.encode('utf8', errors='')
csum = crc32c(arg, csum)
else:
raise InvalidChecksumError()
