From 577ade6c4b056777c8687c262dc01b76dbeadc6b Mon Sep 17 00:00:00 2001 From: "Fanani M. Ihsan" Date: Thu, 9 Jun 2016 13:37:19 +0700 Subject: [PATCH] fixing get_serialnumber method --- zk/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")