Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tenable.nessus: agents.list() exception: TypeError: object of type 'NoneType' has no len() #687

Closed
dsobon opened this issue Mar 21, 2023 · 0 comments
Labels
bug This is a bug with the pyTenable library Nessus Nessus Package

Comments

@dsobon
Copy link

dsobon commented Mar 21, 2023

Describe the bug

For tenable.nessus module, "api.agents.list()" fails if there are no agents linked to an instance of Nessus Manager.

To Reproduce

from tenable.nessus import Nessus
api = Nessus(url=...)
for item in api.agents.list(limit=1000, sort_by="name"):
    print(item)

Current behaviour

 File "./test.py", line 217, in agents_list
    for item in api.agents.list(limit=1000, sort_by="name"):
  File "/usr/local/lib/python3.8/dist-packages/restfly/iterator.py", line 114, in __next__
    return self.next()  # noqa: PLE1102
  File "/usr/local/lib/python3.8/dist-packages/restfly/iterator.py", line 146, in next
    if len(self.page) == 0:
TypeError: object of type 'NoneType' has no len()

Expected behavior

No exception triggered.

@aseemsavio aseemsavio added bug This is a bug with the pyTenable library Nessus Nessus Package labels Mar 23, 2023
SteveMcGrath added a commit that referenced this issue Sep 20, 2024
SteveMcGrath added a commit that referenced this issue Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug with the pyTenable library Nessus Nessus Package
Projects
None yet
Development

No branches or pull requests

3 participants