Fix exception message

styling
LEdoian 1 year ago
parent e80a4e5424
commit 53098c4b41

@ -191,7 +191,7 @@ class OspfFileTopologyParser:
# it must match.) # it must match.)
dr_id, discr = tgt.lstrip(r'[').rstrip(']').split('-') dr_id, discr = tgt.lstrip(r'[').rstrip(']').split('-')
candidates = list(filter(lambda vid: vid.dr_id == dr_id and vid.discriminator == discr, result.vertices)) candidates = list(filter(lambda vid: vid.dr_id == dr_id and vid.discriminator == discr, result.vertices))
if len(candidates) != 1: raise OspfFileParseError(f'Multiple candidates for uniquely determined network {tgt}') if len(candidates) != 1: raise OspfFileParseError(f'Multiple or no candidates for uniquely determined network {tgt}')
tgtid = candidates[0] tgtid = candidates[0]
edge = Edge(source=src, target=tgtid, cost=cost, count=count) edge = Edge(source=src, target=tgtid, cost=cost, count=count)
result.add_edge(edge) result.add_edge(edge)

Loading…
Cancel
Save