Skip to content

Commit

Permalink
Update lhaindex.py
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlehoff authored and RoyStegeman committed Aug 12, 2024
1 parent 8e9eff7 commit b4d7475
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions validphys2/src/validphys/lhaindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ def parse_info(name):
def get_lha_datapath():
"""Return an existing datapath from LHAPDF, starting from the end.
If no path is found to exist, recover the old behaviour and returns the last path.
The check for existence intends to solve problems where a previously filled `LHAPATH`
or `LHAPDF_DATA_PATH` environment variable is pointing to a non-existent path or shared
systems where LHAPDF might be compiled with hard-coded paths not available to all users.
"""
for lhapath in lhapdf.paths()[::-1]:
if Path(lhapath).exists():
Expand Down

0 comments on commit b4d7475

Please sign in to comment.