mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-12 08:29:16 +00:00
Check list length before accessing 1st element (#324)
This commit is contained in:
parent
93e066da14
commit
7a64fd92e6
|
@ -172,7 +172,7 @@ def bitcoind_status_page():
|
||||||
local_address = "..."
|
local_address = "..."
|
||||||
if networkdata != None:
|
if networkdata != None:
|
||||||
local_address = "not none"
|
local_address = "not none"
|
||||||
if "localaddresses" in networkdata:
|
if ("localaddresses" in networkdata) and (len(networkdata["localaddresses"]) > 0):
|
||||||
local_address = "{}:{}".format(networkdata["localaddresses"][0]["address"], networkdata["localaddresses"][0]["port"])
|
local_address = "{}:{}".format(networkdata["localaddresses"][0]["address"], networkdata["localaddresses"][0]["port"])
|
||||||
|
|
||||||
# Balance
|
# Balance
|
||||||
|
|
Loading…
Reference in New Issue
Block a user