Applying patch from @fduraffourg that fixes #9

This commit is contained in:
Alarig Le Lay 2019-04-12 19:34:07 +02:00
parent 2ce03ebbb0
commit 50b1f1387e
1 changed files with 5 additions and 1 deletions

6
lg.py
View File

@ -575,7 +575,11 @@ def build_as_tree_from_raw_bird_ouput(host, proto, text):
net_dest = expr2.group(1).strip()
if line.startswith("BGP.as_path:"):
path.extend(line.replace("BGP.as_path:", "").strip().split(" "))
ASes = line.replace("BGP.as_path:", "").strip().split(" ")
if path:
path.extend(ASes)
else:
path = ASes
if path:
path.append(net_dest)