We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9741924 + 333d9ec commit c7d8062Copy full SHA for c7d8062
labgrid/remote/config.py
@@ -21,9 +21,8 @@ def __attrs_post_init__(self):
21
line_comment_prefix="##",
22
)
23
try:
24
- with open(self.filename) as file:
25
- template = env.from_string(file.read())
26
- except FileNotFoundError:
+ template = env.get_template(os.path.basename(self.filename))
+ except jinja2.TemplateNotFound:
27
raise NoConfigFoundError(f"{self.filename} could not be found")
28
rendered = template.render(self.template_env)
29
pprint(("rendered", rendered))
0 commit comments