diff --git a/neo/node.py b/neo/node.py index 6a6e6c183017979792d8056735d67af9acb13616..9f88a9eda3d4f3fa55e2307e72f8a2827677bf32 100644 --- a/neo/node.py +++ b/neo/node.py @@ -245,9 +245,15 @@ class NodeManager(object): def log(self): 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 = ( - dump(uuid), + uuid, protocol.node_type_prefix_dict[node.getType()], protocol.node_state_prefix_dict[node.getState()] )