Commit 7d1e8677 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Improve node manager logging method to display node without UUIDs, but the sort

on UUIDs is lost.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1155 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 00e286c8
...@@ -245,9 +245,15 @@ class NodeManager(object): ...@@ -245,9 +245,15 @@ class NodeManager(object):
def log(self): def log(self):
logging.debug('Node manager : %d nodes' % len(self.node_list)) logging.debug('Node manager : %d nodes' % len(self.node_list))
for uuid, node in sorted(self.uuid_dict.items()): node_with_uuid = set(sorted(self.uuid_dict.values()))
node_without_uuid = set(self.node_list) - node_with_uuid
for node in node_with_uuid | node_without_uuid:
if node.getUUID() is not None:
uuid = dump(node.getUUID())
else:
uuid = '-' * 32
args = ( args = (
dump(uuid), uuid,
protocol.node_type_prefix_dict[node.getType()], protocol.node_type_prefix_dict[node.getType()],
protocol.node_state_prefix_dict[node.getState()] protocol.node_state_prefix_dict[node.getState()]
) )
......
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