1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

use None instead of --

This commit is contained in:
Kelly Brazil
2019-10-23 17:27:23 -07:00
parent a1a3de32ec
commit 91eb9a4d13

View File

@ -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]