Update modules/visual_route.py

This commit is contained in:
Blackwhitebear8 2025-08-13 18:26:52 +02:00
parent 5046d3a002
commit a8802d6e05

View file

@ -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: