Check file existence for error check

This commit is contained in:
Roy Nieterau 2025-06-11 19:33:36 +02:00
parent 7b5ff1394c
commit 706d72f045

View file

@ -876,7 +876,7 @@ class AbstractTemplateBuilder(ABC):
).format(host_name.title()))
resolved_path = self.resolve_template_path(path)
if not resolved_path:
if not resolved_path or not os.path.exists(resolved_path):
raise TemplateNotFound(
f"Template path '{path}' does not resolve to a valid existing "
"template file on disk."