Commit 5f8d6207 authored by Vincent Pelletier's avatar Vincent Pelletier

Improve iHotfix cleanup code to distinguish between a non-need to cleanup and...

Improve iHotfix cleanup code to distinguish between a non-need to cleanup and a need to remove iHotfix context.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20923 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2c693d69
......@@ -853,16 +853,19 @@ class ActivityTool (Folder, UniqueObject):
for item in base_chain:
my_self = item.__of__(my_self)
else:
old_ihotfix_context = None
old_ihotfix_context = False
my_self = self
LOG('CMFActivity.ActivityTool.invoke', INFO, 'Strange: invoke is called outside of acquisition context.')
message(my_self)
if old_ihotfix_context is not None:
if old_ihotfix_context is not False:
# Restore iHotfix context
id = get_ident()
iHotfix._the_lock.acquire()
try:
iHotfix.contexts[id] = old_ihotfix_context
if old_ihotfix_context is None:
del iHotfix.contexts[id]
else:
iHotfix.contexts[id] = old_ihotfix_context
finally:
iHotfix._the_lock.release()
if logging:
......
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