Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug #925 Report Summary
A user reported a usability issue with Suzieq version 0.22.0 when using the Python API to retrieve path information. The API call was made with
namespace
provided as a string instead of a list, leading to anEmptyDataframeError
. The error did not clearly indicate the cause, leading to confusion.Changes Made
To address this issue, two significant changes were implemented:
Introduction of Argument Validation in
basicobj.py
:_validate_list_args
was added to enforce that certain arguments, specificallynamespace
andhostname
, are provided as lists. If these arguments are not lists, the method raises aTypeError
with a clear and informative error message.Modification in
topology.py
:self._namespaces
was set to an empty list[]
.get
method,self._namespaces
was changed to default to an empty list[]
instead of usingself.ctxt.namespace
. This modification was implemented to address testing issues that arose following the introduction of_validate_list_args
inbasicobj.py
.