Skip to content

Commit

Permalink
Addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-sitton-inl committed Jun 26, 2024
1 parent 72cb3e2 commit ce43d53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/heron.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ def create_componentsets_in_HERON(comp_sets_folder, heron_input_xml):
if textfile.startswith('componentSet') and (textfile.endswith('.json') or textfile.endswith('.txt')):
textfile_path = comp_sets_folder+"/"+textfile
try:
comp_set_dict = json.load(open(textfile_path))
with open(textfile_path) as textfile_opened:
comp_set_dict = json.load(textfile_opened)
except json.JSONDecodeError as e:
raise ValueError(f"The content of {textfile_path} is not in proper JSON format and cannot be read")
raise ValueError(f"The content of {textfile_path} is not in proper JSON format and cannot be read") from e
comp_set_name = comp_set_dict.get('Component Set Name')

ref_driver = comp_set_dict.get('Reference Driver')
Expand Down

0 comments on commit ce43d53

Please sign in to comment.