Commit 6f236c2b authored by Julien Muchembled's avatar Julien Muchembled

Fix file import with Jinja2 >= 2.7

parent 90772890
2.5 (2013-08-07)
======================
* Fix file import with Jinja2 >= 2.7
2.4.3 (2013-08-02)
======================
......
from setuptools import setup, find_packages
import os
version = '2.4.3'
version = '2.5'
name = 'slapos.recipe.template'
long_description = open("README.txt").read() + "\n" + \
open(os.path.join('slapos', 'recipe',
......@@ -26,7 +26,7 @@ setup(name=name,
install_requires=[
'setuptools', # namespaces
'zc.buildout', # plays with buildout
'jinja2',
'jinja2 >= 2.7',
],
zip_safe=True,
entry_points={
......
......@@ -71,11 +71,10 @@ class RelaxedPrefixLoader(PrefixLoader):
"""
Same as PrefixLoader, but accepts imports lacking separator.
"""
def get_source(self, environment, template):
def get_loader(self, template):
if self.delimiter not in template:
template += self.delimiter
return super(RelaxedPrefixLoader, self).get_source(environment,
template)
return super(RelaxedPrefixLoader, self).get_loader(template)
class RecipeBaseLoader(BaseLoader):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment