Skip to content

When no template is installed juno raises an exception #2

@marianoguerra

Description

@marianoguerra

if I don't install jinja and my application raises an exception, then juno tries to render the error using a template, no matter if I said 'use_templates': False on juno.init

the traceback:

Traceback (most recent call last):
File "/usr/lib/python2.6/wsgiref/handlers.py", line 93, in run
self.result = application(self.environ, self.start_response)
File "/home/mariano/Proyectos/taskr/juno.py", line 727, in application
**environ)
File "/home/mariano/Proyectos/taskr/juno.py", line 200, in request
return servererror(error=cgi.escape(str(sys.exc_info()))).render()
File "/home/mariano/Proyectos/taskr/juno.py", line 507, in servererror
return template(file, error=error)
File "/home/mariano/Proyectos/taskr/juno.py", line 552, in template
return append(render_template(t, *_kwargs))
File "/home/mariano/Proyectos/taskr/juno.py", line 574, in render_template
return config('render_template_handler')(template_obj, *_kwargs)
File "/home/mariano/Proyectos/taskr/juno.py", line 585, in _render_template_handler
return template_obj.render(**kwargs).encode(config('charset'))
AttributeError: 'NoneType' object has no attribute 'render'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions