Skip to content

Commit

Permalink
Merge pull request #164 from Aberasturi/loading-status
Browse files Browse the repository at this point in the history
Error loading node status because JSONDecodeERROR
  • Loading branch information
WadeBarnes authored Aug 14, 2021
2 parents 712d53d + 7a10aea commit 865a6d4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions server/anchor.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,12 +628,16 @@ async def validator_info(self):

ret = []
for node in node_aliases:
reply = json.loads(node_data[node])
if "result" not in reply:
try:
reply = json.loads(node_data[node])
if "result" not in reply:
continue
data = reply["result"].get("data")
data["Node_info"]["Name"] = node
ret.append(data)
# Some of the nodes a not reachable.
except json.decoder.JSONDecodeError:
continue
data = reply["result"].get("data")
data["Node_info"]["Name"] = node
ret.append(data)
return ret

@property
Expand Down

0 comments on commit 865a6d4

Please sign in to comment.