Fix energy parser
This commit is contained in:
@@ -150,6 +150,11 @@ def inp_in_energy(section: list[str]) -> ChangeSet:
|
|||||||
for key in get_energy_schema('').keys():
|
for key in get_energy_schema('').keys():
|
||||||
if line.startswith(key):
|
if line.startswith(key):
|
||||||
value = line.removeprefix(key).strip()
|
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 })
|
cs.append(g_update_prefix | { 'type' : 'energy', key : value })
|
||||||
|
|
||||||
return cs
|
return cs
|
||||||
|
|||||||
Reference in New Issue
Block a user