Additional minor fixes when using 'all'

This commit is contained in:
Simon Marsh 2019-05-15 08:46:41 +01:00
parent 594088be69
commit 0de6a8cfaa
Signed by: burble
GPG Key ID: 7B9FE8780CFB6593

4
lg.py
View File

@ -318,7 +318,7 @@ def detail(hosts, proto="ipv4"):
errors.append("%s: bird command failed with error, %s" % (host, "\n".join(res)))
continue
detail[host] = {"status": res[1], "description": add_links(res[2:]).decode("utf-8")}
detail[host] = {"status": res[1], "description": add_links(res[2:])}
return render_template('detail.html', detail=detail, command=command, errors=errors)
@ -717,7 +717,7 @@ def show_route(request_type, hosts, proto):
errors = []
hosts = hosts.split("+")
if hosts == ["all"]:
hosts = app.config["PROXY"].keys()
hosts = list(app.config["PROXY"].keys())
allhosts = hosts[:]
for host in allhosts:
ret, res = bird_command(host, proto, command)