diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-06 07:24:11 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-06 07:24:11 +0200 |
commit | 10c06217a53b28a3b481c451e65da62e9b531a24 (patch) | |
tree | cc3948a72ed185240dc0bd86492e725bd9f91a1f /src/conf_mode | |
parent | 960e9e0bc0aba72f748ee880dbf9fc3a22dafc5b (diff) | |
download | vyos-1x-10c06217a53b28a3b481c451e65da62e9b531a24.tar.gz vyos-1x-10c06217a53b28a3b481c451e65da62e9b531a24.zip |
ipsec: T2230: bugfix rewriting Jinja2 code
Commit dbc174d ("ipsec: T2230: move inlined templates to dedicated files")
did not alter existing code which was used for template processing.
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/ipsec-settings.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/ipsec-settings.py b/src/conf_mode/ipsec-settings.py index 1ebf6a5cd..2fa27022b 100755 --- a/src/conf_mode/ipsec-settings.py +++ b/src/conf_mode/ipsec-settings.py @@ -147,8 +147,8 @@ def verify(data): def generate(data): tmpl_path = os.path.join(vyos_data_dir['data'], 'templates', 'ipsec') - fs_loader = jinja2.FileSystemLoader(tmpl_path) - env = jinja2.Environment(loader=fs_loader, trim_blocks=True) + fs_loader = FileSystemLoader(tmpl_path) + env = Environment(loader=fs_loader, trim_blocks=True) tmpl = env.get_template('charon.tmpl') config_text = tmpl.render(data) @@ -182,7 +182,7 @@ def generate(data): l2pt_ipsec_conf_txt = tmpl.render(c) old_umask = os.umask(0o077) with open(ipsec_conf_flie,'a') as f: - .write(l2pt_ipsec_conf_txt) + f.write(l2pt_ipsec_conf_txt) os.umask(old_umask) append_ipsec_conf(data) |