mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-30 01:32:21 +00:00
Better explain the source of error in exception message
If user forgets to fill in the path_bandwidth, error message was not explicit enough to help to correct. Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I776e95b6f859c3b643786b6e802f3c0bcbc1de76
This commit is contained in:
@@ -120,7 +120,10 @@ class OMS:
|
||||
"""
|
||||
if (nvalue is None or mvalue is None or isinstance(nvalue, float)
|
||||
or isinstance(mvalue, float) or mvalue == 0):
|
||||
raise SpectrumError('could not assign None values')
|
||||
raise SpectrumError(f'Could not assign N {nvalue}, M {mvalue}. N and M must be ' + \
|
||||
'integer, with M>0. N and M may be derived from service' + \
|
||||
' path_bandwidth request. Please check that path_bandwidth is' + \
|
||||
' positive and non zero.')
|
||||
startn, stopn = mvalue_to_slots(nvalue, mvalue)
|
||||
# print(f'startn stop n {startn} , {stopn}')
|
||||
# assumes that guardbands are sufficient to ensure that assigning a center channel
|
||||
|
||||
Reference in New Issue
Block a user