exception handling while checksum check
This commit is contained in:
parent
8ab382dd63
commit
51166e5ef1
@ -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__())
|
||||
|
Loading…
x
Reference in New Issue
Block a user