fixing get_serialnumber method
This commit is contained in:
parent
77887d1e7a
commit
577ade6c4b
@ -192,8 +192,8 @@ class ZK(object):
|
||||
|
||||
cmd_response = self.__send_command(command, command_string, checksum, session_id, reply_id, response_size)
|
||||
if cmd_response.get('status'):
|
||||
serialnumber = self.__data_recv[8:].split('=')
|
||||
return serialnumber[-1]
|
||||
serialnumber = self.__data_recv[8:].split('=')[-1].strip('\x00|\x01\x10x')
|
||||
return serialnumber
|
||||
else:
|
||||
raise Exception("Invalid response")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user