Skip to content
Snippets Groups Projects
Commit 968397fc authored by Colm Talbot's avatar Colm Talbot
Browse files

Resolve "Make bilby_result look for pickle result if passed result isn't present."

parent 23159d45
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,16 @@ def read_in_result_list(filename_list, invalid="warning"):
"""
results_list = []
for filename in filename_list:
if (
not os.path.exists(filename)
and os.path.exists(f"{os.path.splitext(filename)[0]}.pkl")
):
pickle_path = f"{os.path.splitext(filename)[0]}.pkl"
logger.warning(
f"Result file {filename} doesn't exist but {pickle_path} does. "
f"Using {pickle_path}."
)
filename = pickle_path
try:
results_list.append(read_in_result(filename=filename))
except Exception as e:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment