Commit 39bd9588 authored by Aurel's avatar Aurel

hasOffset must now tests an empty list instead of a None value


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@279 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent fbeb6732
......@@ -111,7 +111,7 @@ class PartitionTable(object):
self.num_filled_rows = self.np
def setCell(self, offset, node, state):
def setCell(self, offset, node, state):
if state == DISCARDED_STATE:
return self.removeCell(offset, node)
if node.getState() in (BROKEN_STATE, DOWN_STATE):
......@@ -153,7 +153,7 @@ class PartitionTable(object):
return self.num_filled_rows == self.np
def hasOffset(self, offset):
return self.partition_list[offset] is not None
return len(self.partition_list[offset]) > 0
def log(self):
"""Help debugging partition table management."""
......
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