mirror of
https://github.com/sileht/bird-lg.git
synced 2024-11-22 06:54:43 +01:00
Fix exception when bgpmap can not be generated
This commit is contained in:
parent
1474ff90aa
commit
d148daf4e2
5
lg.py
5
lg.py
|
@ -388,7 +388,7 @@ def show_bgpmap():
|
|||
edge.set_style("bold")
|
||||
|
||||
#colors = [ "#009e23", "#1a6ec1" , "#d05701", "#6f879f", "#939a0e", "#0e9a93", "#9a0e85", "#56d8e1" ]
|
||||
|
||||
previous_as = None
|
||||
hosts = data.keys()
|
||||
for host, asmaps in data.iteritems():
|
||||
first = True
|
||||
|
@ -428,6 +428,7 @@ def show_bgpmap():
|
|||
previous_as = _as
|
||||
first = False
|
||||
|
||||
if previous_as:
|
||||
node = add_node(previous_as)
|
||||
node.set_shape("box")
|
||||
|
||||
|
@ -541,7 +542,7 @@ def show_route(request_type, hosts, proto):
|
|||
if bgpmap:
|
||||
detail = json.dumps(detail)
|
||||
|
||||
return render_template((bgpmap and 'bgpmap.html' or 'route.html'), detail=detail, command=command, expression=expression, error="<br>".join(error))
|
||||
return render_template((bgpmap and 'bgpmap.html' or 'route.html'), detail=detail, command=command, expression=expression, error="<br />".join(error))
|
||||
|
||||
|
||||
app.secret_key = app.config["SESSION_KEY"]
|
||||
|
|
Loading…
Reference in a new issue