Commit 22564cb5 authored by Aurel's avatar Aurel

add method to clear node manager


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