Skip to content
Permalink
Browse files

better error on syntax errors in templates

  • Loading branch information...
jabdoa2 committed Jul 20, 2019
1 parent 4f77561 commit 5ce27ba9d7c2392d47fd1598790a89fdd43d9063
Showing with 4 additions and 1 deletion.
  1. +4 −1 mpf/core/placeholder_manager.py
@@ -576,7 +576,10 @@ def __init__(self, machine):

@staticmethod
def _parse_template(template_str):
return ast.parse(template_str, mode='eval').body
try:
return ast.parse(template_str, mode='eval').body
except SyntaxError:
raise AssertionError("Failed to parse template {}".format(template_str))

@staticmethod
def _eval_num(node, variables, subscribe):

0 comments on commit 5ce27ba

Please sign in to comment.
You can’t perform that action at this time.