[Neo-report] r2428 gregory - /trunk/neo/pt.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Nov 8 11:24:05 CET 2010


Author: gregory
Date: Mon Nov  8 11:24:05 2010
New Revision: 2428

Log:
The offset given to removeCell should always match the number of partitions.

Modified:
    trunk/neo/pt.py

Modified: trunk/neo/pt.py
==============================================================================
--- trunk/neo/pt.py [iso-8859-1] (original)
+++ trunk/neo/pt.py [iso-8859-1] Mon Nov  8 11:24:05 2010
@@ -186,13 +186,13 @@ class PartitionTable(object):
 
     def removeCell(self, offset, node):
         row = self.partition_list[offset]
-        if row is not None:
-            for cell in row:
-                if cell.getNode() == node:
-                    row.remove(cell)
-                    if not cell.isFeeding():
-                        self.count_dict[node] -= 1
-                    break
+        assert row is not None
+        for cell in row:
+            if cell.getNode() == node:
+                row.remove(cell)
+                if not cell.isFeeding():
+                    self.count_dict[node] -= 1
+                break
 
     def load(self, ptid, row_list, nm):
         """





More information about the Neo-report mailing list