Better bird parsing
This commit is contained in:
parent
15bfd12b5c
commit
2fea65579b
|
@ -154,8 +154,8 @@ def _birdMakeProtocols(info):
|
|||
"online": data[n][2] == "Established",
|
||||
"neighbor_address": data[n+1][2],
|
||||
"neighbor_as": int(data[n+2][2]),
|
||||
"neighbor_id": data[n+3][2] if data[n+3][0:2] == ["Neighbor", "ID:"] else None,
|
||||
"last_error": " ".join(data[n+3][2:]) if data[n+3][0:2] == ["Last", "error:"] else None,
|
||||
"neighbor_id": data[n+3][2] if len(data) > n+3 and data[n+3][0:2] == ["Neighbor", "ID:"] else None,
|
||||
"last_error": " ".join(data[n+3][2:]) if len(data) > n+3 and data[n+3][0:2] == ["Last", "error:"] else None,
|
||||
}
|
||||
|
||||
if not found:
|
||||
|
|
Loading…
Reference in New Issue