Skip to content

Commit

Permalink
Fix path calculation for templates of modules
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Wolf <[email protected]>
  • Loading branch information
NotTheEvilOne committed May 31, 2024
1 parent 7c4a40a commit d7deaba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rookify/modules/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@ def execute(self) -> None:
pass

def load_template(self, filename: str, **variables: Any) -> __Template:
template_path = os.path.join(os.path.dirname(__file__), "templates", filename)
template_path = os.path.join(
os.path.dirname(__file__),
self.__class__.__module__.rsplit(".", 2)[1],
"templates",
filename,
)
template = ModuleHandler.__Template(template_path)
template.render(**variables)
return template
Expand Down

0 comments on commit d7deaba

Please sign in to comment.