Commit a7a0c4c6 authored by Aurel's avatar Aurel

row is by default an empty list, not a None value, so do the rigth comparison


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@249 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 48b49442
......@@ -114,14 +114,13 @@ class PartitionTable(object):
def setCell(self, offset, node, state):
if state == DISCARDED_STATE:
return self.removeCell(offset, node)
if node.getState() in (BROKEN_STATE, DOWN_STATE):
return
row = self.partition_list[offset]
if row is None:
if len(row) == 0:
# Create a new row.
row = [Cell(node, state)]
row = [Cell(node, state),]
if state != FEEDING_STATE:
self.count_dict[node] = self.count_dict.get(node, 0) + 1
self.partition_list[offset] = row
......
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