Skip to content

Commit

Permalink
metadata: use new importlib.resources API
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarrison committed May 9, 2024
1 parent e6945c6 commit 6461959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions abacusnbody/metadata/abacussummit.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def get_meta(simname, redshift=None):
if metadata is None:
metadata = {}
for metadata_fn in metadata_fns:
with importlib.resources.open_binary(
'abacusnbody.metadata', metadata_fn
with importlib.resources.files('abacusnbody.metadata').joinpath(
metadata_fn
) as fp, asdf.open(fp) as af:
af_tree = dict(af.tree)
del af_tree['asdf_library'], af_tree['history']
Expand Down

0 comments on commit 6461959

Please sign in to comment.