Skip to content

Commit

Permalink
If _path is set do not search current directory
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpaterno authored Feb 11, 2025
1 parent 1271e27 commit 7daad6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firecrown/likelihood/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def get_sacc_data(self) -> sacc.Sacc:
if full_sacc_data_path.exists():
return sacc.Sacc.load_fits(full_sacc_data_path)
# If path is not set, use the current directory
if sacc_data_path.exists():
elif sacc_data_path.exists():
return sacc.Sacc.load_fits(sacc_data_path)
# If the file does not exist, raise an error
raise FileNotFoundError(f"File {sacc_data_path} does not exist")
Expand Down

0 comments on commit 7daad6f

Please sign in to comment.