jinja2: Fix zc.buildout related import
jinja2_template imports zc.buildout, but uses zc.buildout.buildout (note the double .buildout). As the result, when tried to use in standalone mode, importing slapos.recipe.template.jinja2_template fails: In [1]: import slapos.recipe.template.jinja2_template --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import slapos.recipe.template.jinja2_template File ~/src/wendelin/slapos/slapos.recipe.template/slapos/recipe/template/jinja2_template.py:56 53 raise AssertionError(*args) 54 DEFAULT_CONTEXT['assert'] = _assert ---> 56 _buildout_safe_dumps = getattr(zc.buildout.buildout, 'dumps', None) 57 DUMPS_KEY = 'dumps' 58 DEFAULT_IMPORT_DELIMITER = '/' AttributeError: module 'zc.buildout' has no attribute 'buildout' That happens because zc.buildout is just a package and doe...
Showing
Please register or sign in to comment