Fix handling of non-ascii chars in bird output

This commit is contained in:
TimStallard 2019-01-30 18:32:16 +00:00
parent 284e2c9212
commit 1f4d9423a9
No known key found for this signature in database
GPG Key ID: E18E975C6A734F07

2
lg.py
View File

@ -314,7 +314,7 @@ def detail(hosts, proto=app.config.get("PROTO_DEFAULT", "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:])}
detail[host] = {"status": res[1], "description": add_links(res[2:]).decode("utf-8")}
return render_template('detail.html', detail=detail, command=command, errors=errors)