Skip to content

Commit

Permalink
jinja fix
Browse files Browse the repository at this point in the history
  • Loading branch information
panlinux committed Nov 22, 2023
1 parent d6a370f commit fb1c46f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debian/jinja2_render
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ from jinja2 import Template

input_file = sys.argv[1]
output_file = sys.argv[2]
kwargs = {}

# key=value pairs in the command-line
if len(sys.argv) > 3:
kwargs.update({arg.split("=")[0]:arg.split("=")[1] for arg in sys.argv[3:]})
kwargs = {arg.split("=")[0]:arg.split("=")[1] for arg in sys.argv[3:]}

t = Template(open(input_file, "r").read())
output = t.render(**kwargs)
Expand Down

0 comments on commit fb1c46f

Please sign in to comment.