summary: fix bug where we're connected to a node without node_announce

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-04-09 19:18:24 +09:30
committed by Christian Decker
parent 734cc0da95
commit b286d7b47e

View File

@@ -153,7 +153,7 @@ def summary(plugin):
s += '({})'.format(extra) s += '({})'.format(extra)
node = plugin.rpc.listnodes(c[3])['nodes'] node = plugin.rpc.listnodes(c[3])['nodes']
if len(node) != 0: if len(node) != 0 and 'alias' in node[0]:
s += ':' + node[0]['alias'] s += ':' + node[0]['alias']
else: else:
s += ':' + c[3][0:32] s += ':' + c[3][0:32]