Currently, if no executable found in default location when using get_mechanical_path , then we are returning None. This is causing issue when we call version_from_path where we give path as input. We do not have any check if path is None.
Alternately we can avoid this exception and return path as empty string (as it is) it is instead of None. If that is the case then version_from_path will take care of value error if path is empty string
Currently, if no executable found in default location when using
get_mechanical_path
, then we are returningNone
. This is causing issue when we callversion_from_path
where we givepath
as input. We do not have any check if path is None.Alternately we can avoid this exception and return
path
as empty string (as it is) it is instead ofNone
. If that is the case thenversion_from_path
will take care of value error ifpath
isempty string