1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixed bug for string size mismatch, now substring depends on size of match string Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
Brian Coca 2012-11-19 09:54:19 -05:00 committed by Brian Coca
parent 6a1e2aaff5
commit d7f38d07b3

View file

@ -279,7 +279,7 @@ def template_from_file(basedir, path, vars):
# Get jinja env overrides from template # Get jinja env overrides from template
if data.startswith(JINJA2_OVERRIDE): if data.startswith(JINJA2_OVERRIDE):
eol = data.find('\n') eol = data.find('\n')
line = data[5:eol] line = data[len(JINJA2_OVERRIDE):eol]
data = data[eol+1:] data = data[eol+1:]
for pair in line.split(','): for pair in line.split(','):
(key,val) = pair.split(':') (key,val) = pair.split(':')