Commit c1e9eb56 authored by Aurel's avatar Aurel

it's better to use a filter method here


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@448 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 22564cb5
......@@ -162,8 +162,7 @@ class NodeManager(object):
def getNodeByUUID(self, uuid):
return self.uuid_dict.get(uuid)
def clear(self, exclude_node_type=None):
def clear(self, filter=None):
for node in self.getNodeList():
if exclude_node_type is not None and \
node.getNodeType() != exclude_node_type:
if filter is not None and filter(node):
self.remove(node)
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