Skip to content

Commit

Permalink
Save cmd1 response correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandoislas committed May 27, 2017
1 parent 2d41f1f commit 0edab3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drc-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0edab3b

Please sign in to comment.