[elbe-devel] [PATCH 02/19] elbepack: write templates from arbitrary pathlike objects

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Mar 19 08:47:31 CET 2024


This allows the change to importlib.resources.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/templates.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/templates.py b/elbepack/templates.py
index 7b9c5e9a95df..6484e672c441 100644
--- a/elbepack/templates.py
+++ b/elbepack/templates.py
@@ -18,7 +18,7 @@ def fix_linebreak_escapes(s):
 def template(fname, d, linebreak=False):
     try:
         return Template(
-            filename=fname,
+            filename=os.fspath(fname),
             preprocessor=fix_linebreak_escapes if linebreak else None,
         ).render(**d)
     except BaseException:

-- 
2.44.0



More information about the elbe-devel mailing list