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)
|
cmd_response = self.__send_command(command, command_string, checksum, session_id, reply_id, response_size)
|
||||||
if cmd_response.get('status'):
|
if cmd_response.get('status'):
|
||||||
serialnumber = self.__data_recv[8:].split('=')
|
serialnumber = self.__data_recv[8:].split('=')[-1].strip('\x00|\x01\x10x')
|
||||||
return serialnumber[-1]
|
return serialnumber
|
||||||
else:
|
else:
|
||||||
raise Exception("Invalid response")
|
raise Exception("Invalid response")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user