Fix energy parser

This commit is contained in:
WQY\qiong
2022-11-18 20:10:32 +08:00
parent 0b5ce70966
commit 1348c6626d

View File

@@ -150,6 +150,11 @@ def inp_in_energy(section: list[str]) -> ChangeSet:
for key in get_energy_schema('').keys():
if line.startswith(key):
value = line.removeprefix(key).strip()
# exception here
if line.startswith('GLOBAL EFFICIENCY'):
value = line.removeprefix('GLOBAL EFFICIENCY').strip()
cs.append(g_update_prefix | { 'type' : 'energy', key : value })
return cs