File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def init_config(
9696 raise ImportError ("Failed to import a configuration content" )
9797 LOG .debug (initial_config )
9898 temp_dir = TemporaryDirectory ()
99- config_path = f"{ temp_dir .name } /init_config .conf"
99+ config_path = f"{ temp_dir .name } /init .conf"
100100 jobs_input_def = {
101101 "files" : {config_path : initial_config },
102102 "IamOverride" : iam_override ,
Original file line number Diff line number Diff line change 1212from tempfile import TemporaryDirectory
1313from typing import Any
1414
15+ import jinja2 .exceptions
1516import requests
1617from botocore .response import StreamingBody
1718from jinja2 import Environment , FileSystemLoader
@@ -175,6 +176,8 @@ def render_jinja(self):
175176 Allows to use the temp directory as environment base, the original file as source template, and render
176177 a final template.
177178 """
179+ from os import listdir
180+
178181 LOG .info (f"Rendering Jinja for { self .path } - { self .templates_dir .name } " )
179182 jinja_env = Environment (
180183 loader = FileSystemLoader (self .templates_dir .name ),
@@ -183,9 +186,14 @@ def render_jinja(self):
183186 )
184187 jinja_env .filters .update (JINJA_FILTERS )
185188 jinja_env .globals .update (JINJA_FUNCTIONS )
186- template = jinja_env .get_template (path .basename (self .path ))
187- self .content = template .render (env = os .environ )
188- self .write_content (is_template = False )
189+ try :
190+ template = jinja_env .get_template (path .basename (self .path ))
191+ self .content = template .render (env = os .environ )
192+ self .write_content (is_template = False )
193+ except jinja2 .exceptions .TemplateNotFound as error :
194+ LOG .exception (error )
195+ LOG .error (listdir (self .templates_dir .name ))
196+ raise
189197
190198 def set_unix_settings (self ):
191199 """
Original file line number Diff line number Diff line change 11# generated by datamodel-codegen:
22# filename: ecs-files-input.json
3- # timestamp: 2022-07-27T09:21:37 +00:00
3+ # timestamp: 2022-07-28T00:59:13 +00:00
44
55from __future__ import annotations
66
You can’t perform that action at this time.
0 commit comments