bgpmap: Fix crash when 'peer_protocol_name' is not matched by regexp

This protects against cases where the regexp expr2 is broken (such as
currently with some interface names)

Fixes: #64
This commit is contained in:
Baptiste Jonglez 2020-06-16 15:36:44 +02:00
parent c84267edd8
commit 53e717381d
1 changed files with 1 additions and 1 deletions

2
lg.py
View File

@ -558,7 +558,7 @@ def build_as_tree_from_raw_bird_ouput(host, proto, text):
path = None
paths = []
net_dest = None
peer_protocol_name = None
peer_protocol_name = ""
for line in text:
line = line.strip()