Commit aea53b96 authored by Vincent Pelletier's avatar Vincent Pelletier

Split security handling and unlocking into 2 separate try..except levels, for...

Split security handling and unlocking into 2 separate try..except levels, for the sake of robustness.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19176 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 88936b55
......@@ -558,6 +558,7 @@ class ActivityTool (Folder, UniqueObject):
if not acquired:
return
try:
old_sm = getSecurityManager()
try:
try:
......@@ -591,8 +592,9 @@ class ActivityTool (Folder, UniqueObject):
# Catch ALL exception to avoid killing timerserver.
LOG('ActivityTool', ERROR, 'process_timer received an exception', error=sys.exc_info())
finally:
timerservice_lock.release()
setSecurityManager(old_sm)
finally:
timerservice_lock.release()
security.declarePublic('distribute')
def distribute(self, node_count=1):
......
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