diff --git a/zk/base.py b/zk/base.py index 5edecef..1eab4c5 100644 --- a/zk/base.py +++ b/zk/base.py @@ -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")