From 91eb9a4d13e9254bd5bbde931196904c1947a28e Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 23 Oct 2019 17:27:23 -0700 Subject: [PATCH] use None instead of -- --- jc/parsers/lsof.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jc/parsers/lsof.py b/jc/parsers/lsof.py index 8a102f38..04dccb78 100644 --- a/jc/parsers/lsof.py +++ b/jc/parsers/lsof.py @@ -35,14 +35,14 @@ def parse(data): for entry in cleandata: output_line = {} - # normalize data by inserting -- for missing data + # normalize data by inserting Null for missing data temp_line = entry.split(maxsplit=len(headers) - 1) for spec in header_spec: if spec[1] == 'COMMAND' or spec[1] == 'NAME': continue if entry[spec[2] - 1] == ' ': - temp_line.insert(spec[0], '--') + temp_line.insert(spec[0], None) name = ' '.join(temp_line[9:]) fixed_line = temp_line[0:9]