You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile a syntactically invalid (or perhaps just strange) template, I get an indentation error in template.py. I'm using Python 2.5, mako 0.2.3. Minimalist recreation code below.
As one might expect, the error goes away if I add text (non-whitespace) before the %endif.
>>> import mako.template
>>> t=mako.template.Template("%if not None:\n%endif\n")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Mako-0.2.3-py2.5.egg/mako/template.py", line 62, in __init__
(code, module) = _compile_text(self, text, filename)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Mako-0.2.3-py2.5.egg/mako/template.py", line 257, in _compile_text
code = compile(source, cid, 'exec')
File "memory:0x76150", line 21
return ''
^
IndentationError: expected an indented block
>>>
The text was updated successfully, but these errors were encountered:
Migrated issue, originally created by Anonymous
When I compile a syntactically invalid (or perhaps just strange) template, I get an indentation error in template.py. I'm using Python 2.5, mako 0.2.3. Minimalist recreation code below.
As one might expect, the error goes away if I add text (non-whitespace) before the %endif.
The text was updated successfully, but these errors were encountered: