Fix trailing newline getting dropped

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-11-22 11:57:41 +01:00 committed by Archana
parent 1f1a34a226
commit fe4ce6dfa2
No known key found for this signature in database
GPG key ID: 0F162FC9DB6BE502

View file

@ -8,7 +8,8 @@ import jinja2
def render(tpl_path):
path, filename = os.path.split(tpl_path)
return jinja2.Environment(
loader=jinja2.FileSystemLoader(path or './')
loader=jinja2.FileSystemLoader(path or './'),
keep_trailing_newline=True,
).get_template(filename).render()
n = len(sys.argv)