mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 14:24:09 -05:00
script/node_get-info.py: handle RPC error responses
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user