Skip to content
Snippets Groups Projects
Commit 150e928d authored by Moul's avatar Moul
Browse files

[mod] #264: Remove remaining parse_endpoints()

parent dcd372b3
No related branches found
No related tags found
1 merge request!186#177, #264: Remove remaining parse_endpoint(s)()
Pipeline #12501 passed
......@@ -31,27 +31,6 @@ from silkaj.constants import (
)
def parse_endpoints(rep):
"""
endpoints[]{"domain", "ip4", "ip6", "pubkey"}
list of dictionaries
reps: raw endpoints
"""
i, j, endpoints = 0, 0, []
while i < len(rep):
if rep[i]["status"] == "UP":
while j < len(rep[i]["endpoints"]):
ep = parse_endpoint(rep[i]["endpoints"][j])
j += 1
if ep is None:
break
ep["pubkey"] = rep[i]["pubkey"]
endpoints.append(ep)
i += 1
j = 0
return endpoints
def singleton(class_):
instances = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment