File fix-template-engine-selection.patch of Package cobbler
From 33c769e995d2f1d315583c5019c55da59631f88f Mon Sep 17 00:00:00 2001
From: "Jens-U. Mozdzen" <jmozdzen@nde.ag>
Date: Fri, 24 Apr 2020 18:42:35 +0200
Subject: [PATCH] When explicitly selecting a templating engine, the raw
template code is re-written to exclude the selection statement, by splitting
the raw data, into lines, deleting the first line and then re-joining to new
raw data.
The original code to join does not work with at least Python 3. This diff
fixes that.
---
cobbler/templar.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cobbler/templar.py b/cobbler/templar.py
index 6ce9e51c3..4c61aa7ea 100644
--- a/cobbler/templar.py
+++ b/cobbler/templar.py
@@ -109,7 +109,7 @@ def render(self, data_input, search_table, out_path, subject=None, template_type
# it and rejoin them to pass to the template language
template_type = lines[0].split("=")[1].strip().lower()
del lines[0]
- raw_data = string.join(lines, "\n")
+ raw_data = "\n".join(lines)
if template_type == "cheetah":
data_out = self.render_cheetah(raw_data, search_table, subject)