From 0edab3b9c6f3893e94dbb0da010c931910f488dc Mon Sep 17 00:00:00 2001 From: Rolando Islas Date: Fri, 26 May 2017 20:59:18 -0700 Subject: [PATCH] Save cmd1 response correctly --- drc-info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drc-info.py b/drc-info.py index 0efdb0c..5b75e87 100644 --- a/drc-info.py +++ b/drc-info.py @@ -34,9 +34,9 @@ def print_packet_cmd(sock): header = command.header.parse(data) if header.packet_type != 2: # Only accept response packets return - size = 8 + size = 8 # header size if header.cmd_id == 1: - data_string = codecs.encode(data[size + command.header_cmd1.sizeof():], "hex").decode() + data_string = codecs.encode(data[size:], "hex").decode() print("cmd 1: %s" % data_string) json_dump["1"] = data_string elif header.cmd_id == 0: