Skip to content

Commit ae812e4

Browse files
author
Alan Christie
committed
fix: Removed 'id' key from rates
1 parent 442ac59 commit ae812e4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/save-er.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def main(c_args: argparse.Namespace) -> None:
5454
header += "\n\n"
5555

5656
num_rates: int = len(er_rv.msg['exchange_rates'])
57+
# Before saving, remove the 'id' from each rate
58+
# - this is distracting and of no real use
59+
for rate in er_rv.msg['exchange_rates']:
60+
del rate['id']
61+
5762
rates: str = yaml.dump(er_rv.msg['exchange_rates'], default_flow_style=False)
5863
Path(filename).write_text(header + rates, encoding='utf8')
5964

0 commit comments

Comments
 (0)