tools (common/template): removed warning catches, jinja2>=2.10.3 now handles them correctly
This commit is contained in:
parent
f065ba4ff6
commit
ed73fd8bf8
1 changed files with 2 additions and 9 deletions
|
|
@ -50,14 +50,7 @@ else:
|
|||
sat_templates # to avoid pyflakes warning
|
||||
|
||||
try:
|
||||
import warnings
|
||||
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
import jinja2
|
||||
jinja2_version = tuple([int(n) for n in jinja2.__version__.split('.')])
|
||||
if jinja2_version > (2, 10, 1):
|
||||
log.warning("New jinja2 version available, warnings catches can be removed")
|
||||
import jinja2
|
||||
except:
|
||||
raise exceptions.MissingModule(
|
||||
"Missing module jinja2, please install it from http://jinja.pocoo.org or with "
|
||||
|
|
|
|||
Loading…
Reference in a new issue