Commit ca854af5 authored by Dave Cunningham's avatar Dave Cunningham

Merge pull request #437 from sparkprime/jinja_imports

Expandybird: Fix Jinja file imports
parents 873a8af4 148129d9
...@@ -282,7 +282,9 @@ def ExpandJinja(file_name, source_template, resource, imports): ...@@ -282,7 +282,9 @@ def ExpandJinja(file_name, source_template, resource, imports):
""" """
try: try:
env = jinja2.Environment(loader=jinja2.DictLoader(imports)) jinja_imports = (
{i['path']: i['content'] for _, i in imports.iteritems()})
env = jinja2.Environment(loader=jinja2.DictLoader(jinja_imports))
template = env.from_string(source_template) template = env.from_string(source_template)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment