Skip to content

Commit

Permalink
Make logic parser handle missing yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeee committed Dec 23, 2023
1 parent 5d52528 commit 090e00f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion buildstock_query/tools/logic_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def __init__(self, opt_sat_path, yaml_file) -> None:
self.opt_df = self.opt_df[self.opt_df["Saturation"] > 0]
self.available_opts = self.opt_df.groupby("Parameter")['Option'].agg(set).to_dict()
self.yaml_file = yaml_file
self.cfg = self.get_cfg(yaml_file)
if yaml_file:
self.cfg = self.get_cfg(yaml_file)

def get_cfg(self, yaml_file) -> dict:
"""Get the buildstock configuration file as a dictionary object.
Expand Down

0 comments on commit 090e00f

Please sign in to comment.