mcu: Convert to Python3 string encoding

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-10-01 19:10:20 -04:00
parent fa25986adc
commit 2978771ce5
1 changed files with 2 additions and 1 deletions

View File

@ -657,7 +657,8 @@ class MCU:
for i, cmd in enumerate(cmdlist):
cmdlist[i] = pin_resolver.update_command(cmd)
# Calculate config CRC
config_crc = zlib.crc32('\n'.join(self._config_cmds)) & 0xffffffff
encoded_config = '\n'.join(self._config_cmds).encode()
config_crc = zlib.crc32(encoded_config) & 0xffffffff
self.add_config_cmd("finalize_config crc=%d" % (config_crc,))
if prev_crc is not None and config_crc != prev_crc:
self._check_restart("CRC mismatch")