Commit 00cfb2f9 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Cosmetic: Since a29456bc, Base.aq_method_lock is a context manager ('with').

parent a663d3f5
......@@ -318,9 +318,7 @@ def synchronizeDynamicModules(context, force=False):
last_sync = cookie
import erp5
Base.aq_method_lock.acquire()
try:
with Base.aq_method_lock:
# Thanks to TransactionalResource, the '_bootstrapped' global variable
# is updated in a transactional way. Without it, it would be required to
# restart the instance if anything went wrong.
......@@ -389,9 +387,6 @@ def synchronizeDynamicModules(context, force=False):
import traceback; traceback.print_exc()
raise
finally:
Base.aq_method_lock.release()
# It's okay for classes to keep references to old methods - maybe.
# but we absolutely positively need to clear the workflow chains
# stored in WorkflowMethod objects: our generation of workflow
......
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