Default to text if no field type is specified.

This commit is contained in:
D. Berge
2024-08-22 18:44:24 +02:00
parent d5a10ca273
commit 7a7106e735

View File

@@ -35,7 +35,7 @@ def parse_line (line, fields, fixed = None):
for key in fields:
spec = fields[key]
transformer = transform[spec["type"]]
transformer = transform[spec.get("type", "str")]
pos_from = spec["offset"]
pos_to = pos_from + spec["length"]
text = line[pos_from:pos_to]