Skip to content

Commit

Permalink
Merge pull request #401 from MaZderMind/patch-1
Browse files Browse the repository at this point in the history
Generate better Error-Message for Null-Key Dict-Access in Mako-Templates
  • Loading branch information
trehn committed May 29, 2018
2 parents 0c94f72 + eba3d97 commit b933c03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bundlewrap/items/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def content_processor_mako(item):
# error message - even though we can't pinpoint the excat
# location of the error. :/
e = _("Undefined variable (look for '${...}')")
elif isinstance(e, KeyError):
e = _("KeyError: {}").format(str(e))
raise TemplateError(_(
"Error while rendering template for {node}:{bundle}:{item}: {error}"
).format(
Expand Down

0 comments on commit b933c03

Please sign in to comment.