[Erp5-report] r31949 nicolas - /erp5/trunk/products/ERP5Type/Utils.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jan 25 17:41:48 CET 2010


Author: nicolas
Date: Mon Jan 25 17:41:47 2010
New Revision: 31949

URL: http://svn.erp5.org?rev=31949&view=rev
Log:
Use internal error handling of LOG class, reviewed by romain

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=31949&r1=31948&r2=31949&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Utils.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Utils.py [utf8] Mon Jan 25 17:41:47 2010
@@ -72,7 +72,6 @@
 from Products.ERP5Type.Accessor.Interface import Getter as InterfaceGetter
 from Products.ERP5Type.Cache import getReadOnlyTransactionCache
 from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
-from zExceptions import ExceptionFormatter
 from zLOG import LOG, BLATHER, PROBLEM, WARNING
 
 #####################################################
@@ -1124,10 +1123,8 @@
   try:
     consistency_class = getattr(Constraint, constraint_definition['type'])
   except AttributeError:
-    exc_info = sys.exc_info()
-    LOG("ERP5Type", PROBLEM, "Can not find Constraint: %s\n%s" % \
-                      (constraint_definition['type'],
-                      ''.join(ExceptionFormatter.format_exception(*exc_info))))
+    LOG("ERP5Type", PROBLEM, "Can not find Constraint: %s" \
+        % constraint_definition['type'], error=sys.exc_info())
     raise ConstraintNotFound(repr(constraint_definition))
   consistency_instance = consistency_class(**constraint_definition)
   property_holder.constraints += [consistency_instance]




More information about the Erp5-report mailing list