mirror of
https://github.com/sileht/bird-lg.git
synced 2024-11-05 07:34:42 +01:00
'NoneType' object has no attribute 'split'
This commit is contained in:
parent
93124adf1b
commit
3f31a86d6a
3
lg.py
3
lg.py
|
@ -437,7 +437,10 @@ def show_bgpmap():
|
||||||
e = edges[edge_tuple]
|
e = edges[edge_tuple]
|
||||||
|
|
||||||
label_without_star = kwargs["label"].replace("*", "")
|
label_without_star = kwargs["label"].replace("*", "")
|
||||||
|
if e.get_label() is not None:
|
||||||
labels = e.get_label().split("\r")
|
labels = e.get_label().split("\r")
|
||||||
|
else:
|
||||||
|
return edges[edge_tuple]
|
||||||
if "%s*" % label_without_star not in labels:
|
if "%s*" % label_without_star not in labels:
|
||||||
labels = [ kwargs["label"] ] + [ l for l in labels if not l.startswith(label_without_star) ]
|
labels = [ kwargs["label"] ] + [ l for l in labels if not l.startswith(label_without_star) ]
|
||||||
labels = sorted(labels, cmp=lambda x,y: x.endswith("*") and -1 or 1)
|
labels = sorted(labels, cmp=lambda x,y: x.endswith("*") and -1 or 1)
|
||||||
|
|
Loading…
Reference in a new issue