aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2017-12-07 18:05:22 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2017-12-07 18:05:22 +0000
commit17a84303e0529c121d730d60ab282dd158fbaf34 (patch)
tree0aa78eb1dc7b74a3f90e8c11c8a4181bdb25ecaa
parentd15adaf66e383a20461a2eeae49fa5d16dafa84e (diff)
parent40e9a765eebc5c5754188338b8eb34059a054ebb (diff)
Merge "utils/agljobtemplate.py: Raise an error if jinja version is incorrect"eel_5.1.0eel_5.0.3eel_4.99.5eel_4.99.4eel/5.1.0eel/5.0.3eel/4.99.5eel/4.99.45.1.05.0.34.99.54.99.4eel
-rw-r--r--utils/agljobtemplate.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py
index 381f7f4..90bad13 100644
--- a/utils/agljobtemplate.py
+++ b/utils/agljobtemplate.py
@@ -48,6 +48,10 @@ class Agljobtemplate(object):
RFS_TYPE = ['nbd', 'ramdisk']
def __init__(self, path=DEFAULT_PATH):
+ try:
+ from jinja2 import select_autoescape
+ except ImportError:
+ raise ImportError, "Please make sure your version of jinja2 is >= 2.9"
self._template_path = os.path.normpath(path)
if not (os.path.isdir(self._template_path) and os.access(self._template_path, os.F_OK)):
raise OSError, "Cannot access {}".format(self._template_path)