Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion chevron/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def unicode(x, y):
# Helper functions
#

class TemplateError(BaseException):
pass

def _html_escape(string):
"""HTML escape all of these " & < >"""

Expand Down Expand Up @@ -96,7 +99,7 @@ def _get_key(key, scopes, warn=False):
# We couldn't find the key in any of the scopes

if warn:
sys.stderr.write("Could not find key '%s'%s" % (key, linesep))
raise TemplateError("Missing a value for key '%s'" % (key, ))

return ''

Expand Down