[Erp5-report] r6903 - /erp5/trunk/products/ERP5/Tool/IdTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Apr 24 16:07:25 CEST 2006


Author: vincent
Date: Mon Apr 24 16:07:17 2006
New Revision: 6903

URL: http://svn.erp5.org?rev=6903&view=rev
Log:
Correct a potential concurent access bug with hasattr.


Modified:
    erp5/trunk/products/ERP5/Tool/IdTool.py

Modified: erp5/trunk/products/ERP5/Tool/IdTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/IdTool.py?rev=6903&r1=6902&r2=6903&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/IdTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/IdTool.py Mon Apr 24 16:07:17 2006
@@ -74,7 +74,8 @@
     """
       Generate a new Id
     """
-    if not hasattr(self,'dict_ids'):
+    
+    if getattr(self, 'dict_ids', None) is None:
       self.dict_ids = PersistentMapping()
 
     new_id = None




More information about the Erp5-report mailing list