Skip to content

Commit

Permalink
Merge e86a139 into efb5ee1
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Jul 5, 2023
2 parents efb5ee1 + e86a139 commit cc44c21
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pysqa/utils/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import pandas
from jinja2 import Template
from jinja2.exceptions import TemplateSyntaxError

from pysqa.utils.execute import execute_command
from pysqa.utils.queues import Queues
Expand Down Expand Up @@ -485,7 +486,10 @@ def _load_templates(queue_lst_dict, directory="."):
for queue_dict in queue_lst_dict.values():
if "script" in queue_dict.keys():
with open(os.path.join(directory, queue_dict["script"]), "r") as f:
queue_dict["template"] = Template(f.read())
try:
queue_dict["template"] = Template(f.read())
except TemplateSyntaxError as error:
raise (TemplateSyntaxError(queue_dict["script"] + ": " + error))

@staticmethod
def _value_error_if_none(value):
Expand Down

0 comments on commit cc44c21

Please sign in to comment.