Update modules/visual_route.py
This commit is contained in:
parent
5046d3a002
commit
a8802d6e05
1 changed files with 4 additions and 1 deletions
|
|
@ -67,10 +67,13 @@ def _parse_bgp_paths_to_graph(bgp_data: str) -> dict:
|
|||
for line in lines[paths_header_index + 1:]:
|
||||
stripped_line = line.strip()
|
||||
if not stripped_line: continue
|
||||
|
||||
is_new_path_line = False
|
||||
if line.startswith(' ') and not line.startswith(' '):
|
||||
first_word = stripped_line.split(' ')[0]
|
||||
if first_word.isdigit() or stripped_line == "Local":
|
||||
|
||||
cleaned_first_word = first_word.replace(',', '')
|
||||
if cleaned_first_word.isdigit() or stripped_line == "Local":
|
||||
is_new_path_line = True
|
||||
|
||||
if is_new_path_line:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue