Commit 37507917 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Get the CompilerError exception properly as in TALESConstraint document


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43981 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1838ec55
......@@ -1280,12 +1280,9 @@ def createExpressionContext(object, portal=None):
tv[cache_key] = ec
return ec
# CompilerError used to be defined in Products.PageTemplates.TALES in
# Zope 2.8
try:
from Products.PageTemplates.TALES import CompilerError
except ImportError:
from zope.tales.tales import CompilerError
# This gets the CompilerError class wherever it is defined (which is
# different depending on the Zope version)
CompilerError = getEngine().getCompilerError()
def evaluateExpressionFromString(expression_context, expression_string):
"""
......
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