aboutsummaryrefslogtreecommitdiff
path: root/kolla/template/methods.py
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz+kolla@linaro.org>2022-03-28 11:39:58 +0000
committerMarcin Juszkiewicz <marcin.juszkiewicz+kolla@linaro.org>2022-03-28 11:39:58 +0000
commit16c230fb114d81a2a09187580875f8b9959ab8d4 (patch)
tree56f64354d29df8914d197147426ccd108b975a43 /kolla/template/methods.py
parent25e9602845fca7ca5b7a5c55fe5b71be0b137f04 (diff)
downloadkolla-16c230fb114d81a2a09187580875f8b9959ab8d4.tar.gz
kolla-16c230fb114d81a2a09187580875f8b9959ab8d4.zip
Revert "Revert "Update code to Jinja 3.0 style""
This reverts commit 25e9602845fca7ca5b7a5c55fe5b71be0b137f04. Reason for revert: we updated to newer Jinja. Change-Id: If666bb4aedd7bb4e3041f0672c3b70e1bb5d36b6
Diffstat (limited to 'kolla/template/methods.py')
-rw-r--r--kolla/template/methods.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kolla/template/methods.py b/kolla/template/methods.py
index 19fcf4e22..69434ef50 100644
--- a/kolla/template/methods.py
+++ b/kolla/template/methods.py
@@ -15,7 +15,7 @@
import os
import yaml
-from jinja2 import contextfunction
+from jinja2 import pass_context
def debian_package_install(packages, clean_package_cache=True):
@@ -71,7 +71,7 @@ def debian_package_install(packages, clean_package_cache=True):
return ' && '.join(cmds)
-@contextfunction
+@pass_context
def handle_repos(context, reponames, mode):
"""NOTE(hrw): we need to handle CentOS, Debian and Ubuntu with one macro.