[Erp5-report] r15778 - /erp5/trunk/products/ERP5Type/XMLMatrix.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Aug 22 14:42:24 CEST 2007
Author: jerome
Date: Wed Aug 22 14:42:24 2007
New Revision: 15778
URL: http://svn.erp5.org?rev=15778&view=rev
Log:
use getattr instead of hasattr
Modified:
erp5/trunk/products/ERP5Type/XMLMatrix.py
Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=15778&r1=15777&r2=15778&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py Wed Aug 22 14:42:24 2007
@@ -372,7 +372,7 @@
new_index = PersistentMapping() # new_index defines the relation
# between keys and ids of cells
- if not hasattr(self, 'index'):
+ if getattr(self, 'index', None) is None:
self.index = PersistentMapping()
# Return if previous range is the same
@@ -406,6 +406,7 @@
if index_list[i] >= size_list[i]:
removed_cell_id_list.append(cell_id)
break
+
for cell_id in removed_cell_id_list:
self._delObject(cell_id)
cell_id_list.remove(cell_id)
More information about the Erp5-report
mailing list