Changeset 2393374 in rattail-fabric


Ignore:
Timestamp:
02/19/19 21:44:26 (2 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
c87ef42
Parents:
f20c7e4
Message:

Tweak how 'env' is added to context for mako template upload

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rattail_fabric/core.py

    rf20c7e4 r2393374  
    138138    template = Template(filename=local_path)
    139139
     140    # make copy of context; add env to it
     141    context = dict(context)
     142    context['env'] = env
     143
    140144    temp_dir = tempfile.mkdtemp(prefix='rattail-fabric.')
    141145    temp_path = os.path.join(temp_dir, os.path.basename(local_path))
    142146    with open(temp_path, 'wb') as f:
    143         text = template.render(env=env, **context)
     147        text = template.render(**context)
    144148        f.write(text.encode(encoding))
    145149    os.chmod(temp_path, os.stat(local_path).st_mode)
Note: See TracChangeset for help on using the changeset viewer.