Skip to content

Commit 7f99c46

Browse files
committed
Fix the json parser.
1 parent 04ddeda commit 7f99c46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/irpmon/irpmon_to_json.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,10 @@ def parse_json_file(path):
486486
bytedata = [a for a in codecs.decode(data, 'hex_codec')]
487487

488488
irp_id = int(entry.get("ID"))
489-
function = Function[entry.get("Major function")]
489+
major_fun = entry.get("Major function")
490+
if major_fun is None:
491+
continue
492+
function = Function[major_fun]
490493
curtime = entry.get("Time")
491494
status_constant = Status[entry.get("IOSB.Status constant")]
492495
irp_address = int(entry.get("IRP address"), 0)

0 commit comments

Comments
 (0)