Commit 417b80c4 authored by Vincent Pelletier's avatar Vincent Pelletier

Use try..except..else instead of treating non-raising case in "try" block.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24089 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 279be27d
......@@ -1062,13 +1062,14 @@ class ActivityTool (Folder, UniqueObject):
else:
try:
m.activateResult(self, result, object)
m.is_executed = MESSAGE_EXECUTED
except:
m.is_executed = MESSAGE_NOT_EXECUTED
m.exc_type = sys.exc_info()[0]
LOG('ActivityTool', WARNING,
'Could not call method %s on object %s' % (
m.method_id, m.object_path), error=sys.exc_info())
else:
m.is_executed = MESSAGE_EXECUTED
if logging:
LOG('Activity Tracking', INFO, 'invoked group messages')
......
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