Skip to content
Snippets Groups Projects
Commit 4eed41ca authored by David Schaefer's avatar David Schaefer
Browse files

allow missing keys in configuration rows

parent 4f3c8573
No related branches found
No related tags found
1 merge request!12fix several new reader issues
......@@ -62,11 +62,16 @@ def _castRow(row: Dict[str, str]) -> Dict[str, Any]:
out = {}
keys = pd.Index(row.keys())
for k, func in CONFIG_TYPES.items():
key = keys[keys.str.match(k)][0]
try:
key = keys[keys.str.match(k)][0]
except IndexError:
continue
value = row[key]
# NOTE:
# this check and the raise should be moved to checkConfig
try:
out[key] = func(value)
except:
except ValueError:
_raise(row, ValueError, f"invalid value: '{value}'")
return out
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment