wbond / pybars3

Handlebars.js template support for Python 3 and 2
GNU Lesser General Public License v3.0
179 stars 46 forks source link

Compile with absolute path throws an error #26

Closed tomgross closed 6 years ago

tomgross commented 8 years ago

If an absolute path is passed to the compiler the following error is thrown:

>>> compiler.compile(hbs_template, path='/home/vagrant/contentwidgets/templates')
  File "/home/vagrant/Eggs/pybars3-0.9.1-py2.7.egg/pybars/_compiler.py", line 798, in compile
    if generate_name:
UnboundLocalError: local variable 'generate_name' referenced before assignment

Version: pybars3: 0.9.1 Python: 2.7.8