Commit 0cfd8865 authored by Jason R. Coombs's avatar Jason R. Coombs

Translate NameError into SyntaxError to meet prescribed API

--HG--
extra : histedit_source : 6ed89212bff75512c980d3fc0f98117510f3b576
parent 054a029a
......@@ -1316,7 +1316,12 @@ def evaluate_marker(text):
for key in env.keys():
new_key = key.replace('.', '_')
env[new_key] = env.pop(key)
return _markerlib.interpret(text, env)
try:
result = _markerlib.interpret(text, env)
except NameError:
e = sys.exc_info()[1]
raise SyntaxError(e.args[0])
return result
# support marker evaluation on Python 2.4+
if sys.version_info < (2,6) and _pyimp() == 'CPython':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment