[Erp5-report] r41744 nicolas.dumazet - /erp5/trunk/products/ERP5Type/dynamic/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 24 08:11:30 CET 2010
Author: nicolas.dumazet
Date: Fri Dec 24 08:11:30 2010
New Revision: 41744
URL: http://svn.erp5.org?rev=41744&view=rev
Log:
move block into lock: if several threads fiddle with erp5.accessor_holder
at the same time, we could lose with some AttributeErrors
Modified:
erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py
Modified: erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py?rev=41744&r1=41743&r2=41744&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py [utf8] Fri Dec 24 08:11:30 2010
@@ -400,14 +400,14 @@ def synchronizeDynamicModules(context, f
for class_name, klass in inspect.getmembers(erp5.portal_type,
inspect.isclass):
klass.restoreGhostState()
+
+ # Clear accessor holders of ZODB Property Sheets
+ for property_sheet_id in erp5.accessor_holder.__dict__.keys():
+ if not property_sheet_id.startswith('__'):
+ delattr(erp5.accessor_holder, property_sheet_id)
finally:
Base.aq_method_lock.release()
- # Clear accessor holders of ZODB Property Sheets
- for property_sheet_id in erp5.accessor_holder.__dict__.keys():
- if not property_sheet_id.startswith('__'):
- delattr(erp5.accessor_holder, property_sheet_id)
-
# Necessary because accessors are wrapped in WorkflowMethod by
# _aq_dynamic (performed in createAccessorHolder)
_aq_reset()
More information about the Erp5-report
mailing list