Revert "Update code to Jinja 3.0 style"
This reverts commit 383364e671
.
Reason for revert: Xena stay in jinja 3.0.1 which still provides contextfilter. In RDO, jinja is consumed from CentOS repo which still provides version 2.11, so this change is causing problems.
I'm proposing to revert this change and retake it Y release when jinja is updated to 3.1 which will not provide contextfilter.
Change-Id: I19c2a15fb0917d2a81daf706a4e02fd377e53b3d
This commit is contained in:
parent
383364e671
commit
25e9602845
@ -12,11 +12,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from jinja2 import pass_context
|
||||
from jinja2 import contextfilter
|
||||
from jinja2 import Undefined
|
||||
|
||||
|
||||
@pass_context
|
||||
@contextfilter
|
||||
def customizable(context, val_list, call_type):
|
||||
# NOTE(mgoddard): Don't try to customise undefined values. There are cases
|
||||
# where this might happen, for example using a generic template overrides
|
||||
|
@ -15,7 +15,7 @@
|
||||
import os
|
||||
import yaml
|
||||
|
||||
from jinja2 import pass_context
|
||||
from jinja2 import contextfunction
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@pass_context
|
||||
@contextfunction
|
||||
def handle_repos(context, reponames, mode):
|
||||
"""NOTE(hrw): we need to handle CentOS, Debian and Ubuntu with one macro.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
docker>=2.4.2 # Apache-2.0
|
||||
Jinja2>=3.0.1 # BSD License (3 clause)
|
||||
Jinja2>=2.8 # BSD License (3 clause)
|
||||
GitPython>=1.0.1 # BSD License (3 clause)
|
||||
oslo.config>=5.1.0 # Apache-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user