Revert "Revert "Update code to Jinja 3.0 style""
This reverts commit 25e9602845
.
Reason for revert: we updated to newer Jinja.
Change-Id: If666bb4aedd7bb4e3041f0672c3b70e1bb5d36b6
This commit is contained in:
parent
25e9602845
commit
16c230fb11
@ -12,11 +12,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from jinja2 import contextfilter
|
||||
from jinja2 import pass_context
|
||||
from jinja2 import Undefined
|
||||
|
||||
|
||||
@contextfilter
|
||||
@pass_context
|
||||
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 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.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
docker>=2.4.2 # Apache-2.0
|
||||
Jinja2>=2.8 # BSD License (3 clause)
|
||||
Jinja2>=3.0.1 # 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