exception handling while checksum check

This commit is contained in:
Dirk Alders 2025-09-11 21:06:38 +02:00
parent 8ab382dd63
commit 51166e5ef1

View File

@ -428,7 +428,11 @@ class pure_json_protocol(object):
return STATUS_OKAY, None
def __check_frame_checksum__(self, frame):
return self.__calc_chksum__(frame[:-4]) == frame[-4:]
try:
return self.__calc_chksum__(frame[:-4]) == frame[-4:]
except TypeError:
logger.exception("Unable to check checksum")
return False
def __clean_receive_buffer__(self):
self.logger.debug("%s Cleaning up receive-buffer", self.__log_prefix__())