From 3dc622b6dc7528fc256919b1c43fd39ae8ca93ea Mon Sep 17 00:00:00 2001 From: Lehman Garrison Date: Wed, 15 Nov 2023 18:23:10 -0500 Subject: [PATCH] metadata: fix unbound local --- abacusnbody/metadata/abacussummit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/abacusnbody/metadata/abacussummit.py b/abacusnbody/metadata/abacussummit.py index 2e507d6..773d4d7 100644 --- a/abacusnbody/metadata/abacussummit.py +++ b/abacusnbody/metadata/abacussummit.py @@ -45,7 +45,7 @@ def get_meta(simname, redshift=None): if 'CLASS_power_spectrum' in af_tree[sim]: metadata[sim]['CLASS_power_spectrum'] = af_tree[sim]['CLASS_power_spectrum'] if simname not in metadata: - raise ValueError(f'Simulation "{simname}" is not in metadata file "{metadata_fn}"') + raise ValueError(f'Simulation "{simname}" is not in metadata files "{metadata_fns}"') res = dict(metadata[simname]['param']) @@ -58,7 +58,7 @@ def get_meta(simname, redshift=None): if not redshift.startswith('z'): redshift = 'z' + redshift if redshift not in metadata[simname]['state']: - raise ValueError(f'Redshift {redshift} metadata not present for "{simname}" in metadata file "{metadata_fn}') + raise ValueError(f'Redshift {redshift} metadata not present for "{simname}" in metadata files "{metadata_fns}') res.update(metadata[simname]['state'][redshift]) return res