Skip to content

Commit

Permalink
Merge pull request #764 from RWTH-EBC/762-add-instance-check-of-expor…
Browse files Browse the repository at this point in the history
…t_vars

764 added exception
  • Loading branch information
DaJansenGit authored Jul 25, 2024
2 parents d6db3d5 + e4534a8 commit 37026f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions teaser/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,8 @@ def process_export_vars(export_vars):
export_vars_str = ''
for index, (var_sel_name, var_list) in enumerate(
export_vars.items(), start=1):
if not isinstance(var_list, list):
raise TypeError(f"Item of key {var_sel_name} in dict 'export_vars' is not an instance of a list!")
export_vars_str += 'MatchVariable(name="'
processed_list = '|'.join(map(str, export_vars[var_sel_name]))
export_vars_str += processed_list
Expand Down

0 comments on commit 37026f0

Please sign in to comment.