Skip to content

Commit

Permalink
For #8
Browse files Browse the repository at this point in the history
  • Loading branch information
mugitty committed Oct 24, 2024
1 parent f261269 commit 99c0019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/convert_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def tmp_print(*argv):
def parse_line(line, data_parser, header):
d = {}
for idx, key in enumerate(header):
if idx < len(line) and line[idx] != "":
if idx < len(line) and line[idx] != "" and key in data_parser:
try:
d[key] = data_parser.get(key, str)(line[idx])
except Exception as e:
Expand Down

0 comments on commit 99c0019

Please sign in to comment.