From b867c57beebbf3d15b4a05017d29a7040361ba2c Mon Sep 17 00:00:00 2001 From: EstherLerouzic Date: Mon, 12 Apr 2021 16:37:43 +0200 Subject: [PATCH] bugfix: don't check a reversed path that has no baudrate without this change if a request was blocked on main path due to 'NO_FEASIBLE_BAUDRATE_WITH_SPACING' and if the request was bidir, there was a propagation tentative on the reversed path despite the fact that no baudrate was selected, which ended up with a program crash. Signed-off-by: EstherLerouzic Change-Id: Ie4e578aab944e534d8b2d99fb02c4e28a242e717 --- gnpy/topology/request.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnpy/topology/request.py b/gnpy/topology/request.py index b150c434..14454778 100644 --- a/gnpy/topology/request.py +++ b/gnpy/topology/request.py @@ -1133,9 +1133,8 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist): # reversed path is needed for correct spectrum assignment reversed_path = find_reversed_path(pathlist[i]) - if pathreq.bidir: - # only propagate if bidir is true, but needs the reversed path anyway for - # correct spectrum assignment + if pathreq.bidir and pathreq.baud_rate is not None: + # Both directions requested, and a feasible mode was found rev_p = deepcopy(reversed_path) print(f'\n\tPropagating Z to A direction {pathreq.destination} to {pathreq.source}')