fixing get_serialnumber method

This commit is contained in:
Fanani M. Ihsan 2016-06-09 13:37:19 +07:00
parent 77887d1e7a
commit 577ade6c4b

View File

@ -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")