Skip to content

Commit

Permalink
consider the case of an empty profile
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlehoff committed Dec 21, 2023
1 parent e633dc0 commit 52d3a6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion validphys2/src/validphys/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def _get_nnpdf_profile(profile_path=None):

if profile_path is not None:
with open(profile_path, "r", encoding="utf-8") as f:
profile_dict.update(yaml_reader.load(f))
profile_entries = yaml_reader.load(f)
if profile_entries is not None:
profile_dict.update(profile_entries)

nnpdf_share = profile_dict.get("nnpdf_share")
if nnpdf_share is None:
Expand Down

0 comments on commit 52d3a6f

Please sign in to comment.