You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On dev branch, in getLineProps function of helpers.py lines 622-665, there is a check for having both the source and lineProps arguments not None, but it is only done after assigning the inputs from the yaml file to the lineProps variable, so the if not lineProps==None statement can never be False.
Current behavior
Warning: both lineProps and source arguments were passed to getLineProps. lineProps will be ignored is always printed out if source is not None, regardless of the lineProps argument.
The text was updated successfully, but these errors were encountered:
This version still shows the same code, I think. The issue I had in mind was about the if not lineProps==None and not source==None rather than if lineProps==None and source==None. I might be missing something here, but I thought these lines:
if not source==None:
lineProps = loadLineProps(source)
if not lineProps==None:
print('Warning: both lineProps and source arguments were passed to getLineProps. lineProps will be ignored.')
do:
check if source is a non-nan argument
load mooring properties from source, and assign this dict to lineProps variable
check if lineProps variable is not none (i.e., suposedly lineProps argument has also been provided to the function). Because we just set lineProps in the previous step, this statement will never be False?
the warning will always be printed out as long as source was provided as an argument.
It could be that loading the moor props from source returns None, but since in loadLineProps() output is initialised as an empty dict, I would think that cannot be the case?
Description
On dev branch, in getLineProps function of helpers.py lines 622-665, there is a check for having both the source and lineProps arguments not None, but it is only done after assigning the inputs from the yaml file to the lineProps variable, so the
if not lineProps==None
statement can never be False.Current behavior
Warning: both lineProps and source arguments were passed to getLineProps. lineProps will be ignored is always printed out if source is not None, regardless of the lineProps argument.
The text was updated successfully, but these errors were encountered: