Fix: penalties are not correctly initialized
When mode is not given and propagation is performed bidir, penalties
corresponding to automatically  selected mode are not correctly
initialized in request, and gnpy-path-request fails.
@@ -1142,6 +1142,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
pathreq.OSNR = mode['OSNR']
pathreq.tx_osnr = mode['tx_osnr']
pathreq.bit_rate = mode['bit_rate']
+ pathreq.penalties = mode['penalties']
# other blocking reason should not appear at this point
except AttributeError:
pathreq.baud_rate = mode['baud_rate']
@@ -1150,6 +1151,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
pathreq.OSNR = mode['OSNR']
pathreq.tx_osnr = mode['tx_osnr']
pathreq.bit_rate = mode['bit_rate']
+ pathreq.penalties = mode['penalties']
# reversed path is needed for correct spectrum assignment
reversed_path = find_reversed_path(pathlist[i])
