Skip to content

Commit

Permalink
ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
tosh2230 committed Nov 14, 2023
1 parent c38142d commit 62cfc62
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/stairlight/source/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,23 @@ def render_by_string_template(
(
f"{e.with_traceback}, "
f"source_type: {self.source_type}, "
f"key: {self.key}"
f"key: {self.key}",
f"template_str: {template_str}",
f"params: {params}",
)
)
rendered_str = s.safe_substitute(params)
except ValueError as e:
logger.warning(
(
f"{e.with_traceback}, "
f"source_type: {self.source_type}, "
f"key: {self.key}",
f"template_str: {template_str}",
f"params: {params}",
)
)
rendered_str = s
return rendered_str

@staticmethod
Expand Down

0 comments on commit 62cfc62

Please sign in to comment.