[Erp5-report] r25335 - /erp5/trunk/products/CMFActivity/ActiveObject.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jan 28 15:42:44 CET 2009


Author: jerome
Date: Wed Jan 28 15:42:43 2009
New Revision: 25335

URL: http://svn.erp5.org?rev=25335&view=rev
Log:
Remove silent try/except on ActiveObject.hasActivity.
According to the comment, this is for the case where portal_activities is not
created, but this case is tested before, so there's no exception to expect
here.


Modified:
    erp5/trunk/products/CMFActivity/ActiveObject.py

Modified: erp5/trunk/products/CMFActivity/ActiveObject.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/ActiveObject.py?rev=25335&r1=25334&r2=25335&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/ActiveObject.py [utf8] (original)
+++ erp5/trunk/products/CMFActivity/ActiveObject.py [utf8] Wed Jan 28 15:42:43 2009
@@ -158,15 +158,9 @@
     """Tells if there is pending activities for this object.
     """
     activity_tool = getToolByName(self, 'portal_activities', None)
-    if activity_tool is None: return 0 # Do nothing if no portal_activities
-    try:
-      return activity_tool.hasActivity(self, **kw)
-    except ConflictError:
-      raise
-    except:
-      # If the portal_activities were not created
-      # there can not be any activity
-      return 0
+    if activity_tool is None:
+      return 0 # Do nothing if no portal_activities
+    return activity_tool.hasActivity(self, **kw)
 
   security.declareProtected( permissions.View, 'hasErrorActivity' )
   def hasErrorActivity(self, **kw):




More information about the Erp5-report mailing list