From 5b532b9b71fdb9de575da0af9b7989ac537877c4 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Fri, 25 Oct 2019 10:31:03 -0700 Subject: [PATCH] minor cleanup --- jc/parsers/lsof.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jc/parsers/lsof.py b/jc/parsers/lsof.py index e1dedd5d..da2243b5 100644 --- a/jc/parsers/lsof.py +++ b/jc/parsers/lsof.py @@ -92,7 +92,6 @@ def parse(data): headers = ['SIZE_OFF' if x == 'SIZE/OFF' else x for x in headers] header_spec = [] - for i, h in enumerate(headers): # header tuple is (index, header_name, col) header_spec.append((i, h, header_row.find(h) + len(h))) @@ -108,11 +107,11 @@ def parse(data): index = spec[0] header_name = spec[1] - col = spec[2] + col = spec[2] - 1 if header_name == 'COMMAND' or header_name == 'NAME': continue - if entry[col - 1] == string.whitespace: + if entry[col] == string.whitespace: temp_line.insert(index, None) name = ' '.join(temp_line[9:])