[Erp5-report] r43981 arnaud.fontaine - /erp5/trunk/products/ERP5Type/Utils.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Mar 4 15:32:13 CET 2011
Author: arnaud.fontaine
Date: Fri Mar 4 15:32:13 2011
New Revision: 43981
URL: http://svn.erp5.org?rev=43981&view=rev
Log:
Get the CompilerError exception properly as in TALESConstraint document
Modified:
erp5/trunk/products/ERP5Type/Utils.py
Modified: erp5/trunk/products/ERP5Type/Utils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Utils.py?rev=43981&r1=43980&r2=43981&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Utils.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Utils.py [utf8] Fri Mar 4 15:32:13 2011
@@ -1280,12 +1280,9 @@ def createExpressionContext(object, port
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):
"""
More information about the Erp5-report
mailing list