From 1646087fd86368918cf266fe528bdf9a2a93085d Mon Sep 17 00:00:00 2001 From: Tom Aldcroft Date: Wed, 27 Sep 2023 12:29:04 -0400 Subject: [PATCH] Implement suggestion to allow fileglob in AGASC_HDF5_FILE --- agasc/agasc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agasc/agasc.py b/agasc/agasc.py index 9bd5d64d..b6ee6c9d 100644 --- a/agasc/agasc.py +++ b/agasc/agasc.py @@ -296,7 +296,9 @@ def get_agasc_filename( """ if agasc_file is None: if "AGASC_HDF5_FILE" in os.environ: - return str(default_agasc_dir() / os.environ["AGASC_HDF5_FILE"]) + agasc_file = os.environ["AGASC_HDF5_FILE"] + if agasc_file.endswith(".h5"): + return str(default_agasc_dir() / os.environ["AGASC_HDF5_FILE"]) else: agasc_file = "proseco_agasc_*"