script/node_get-info.py: handle RPC error responses

This commit is contained in:
darkfi
2025-02-18 21:32:34 +01:00
committed by skoupidi
parent 1ad208f0fd
commit a220243e56

View File

@@ -82,6 +82,10 @@ async def main(argv):
except OSError:
pass
response = await rpc._make_request("p2p.get_info", [])
if "error" in response:
print("Error: ", response["error"])
await rpc.stop()
return
info = response["result"]
channels = info["channels"]
channel_lookup = {}