Merge "Fix Bandit check"

This commit is contained in:
Zuul 2021-03-31 18:41:42 +00:00 committed by Gerrit Code Review
commit e215f7a180
1 changed files with 2 additions and 2 deletions

View File

@ -488,9 +488,9 @@ def render_template(template, params, is_file=True, strict=False):
# and still complains with B701 for that line # and still complains with B701 for that line
# NOTE(pas-ha) not using default_for_string=False as we set the name # NOTE(pas-ha) not using default_for_string=False as we set the name
# of the template above for strings too. # of the template above for strings too.
env = jinja2.Environment( env = jinja2.Environment( # nosec B701
loader=loader, loader=loader,
autoescape=jinja2.select_autoescape(), # nosec B701 autoescape=jinja2.select_autoescape(),
undefined=jinja2.StrictUndefined if strict else jinja2.Undefined undefined=jinja2.StrictUndefined if strict else jinja2.Undefined
) )
tmpl = env.get_template(tmpl_name) tmpl = env.get_template(tmpl_name)