Skip to content

Commit

Permalink
fix(libtofs): “files_switch” mess up the variable defined by “map.jinja”
Browse files Browse the repository at this point in the history
- “map.jinja” export a variable name as “<tplroot>”
- import of “libtofs.jinja” is done with context and has access to
  “<tplroot>” variable
- in “files_switch”, appending the empty string to the “fsl” variable
  modify globally “<tplroot>['tofs']['files_switch']”

* TEMPLATE/libtofs.jinja: initialise “fsl” with a copy of
  “files_switch_list” instead of a reference.
  • Loading branch information
baby-gnu committed Feb 13, 2020
1 parent 705d02a commit 80d58d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TEMPLATE/libtofs.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
{#- Use the default, new method otherwise #}
{%- set fsl = salt['config.get'](
tplroot ~ path_prefix_ext|replace('/', ':') ~ ':files_switch',
files_switch_list
files_switch_list[:]
) %}
{#- Append an empty value to evaluate as `default` in the loop below #}
{%- if '' not in fsl %}
Expand Down

0 comments on commit 80d58d2

Please sign in to comment.