use safer option to format template path

This commit is contained in:
Jakub Trllo 2024-05-06 15:10:36 +02:00
parent aaeaa1e7f0
commit c6b6ca1e3c

View file

@ -1097,9 +1097,12 @@ def _get_host_config_data(templates, template_data):
"""
for template in templates:
formatted_path = StringTemplate.format_strict_template(
formatted_path = StringTemplate.format_template(
template, template_data
)
if not formatted_path.solved:
continue
path = os.path.abspath(formatted_path)
if os.path.exists(path):
return {