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

Bug with the parameter "last_modified" in the method "list" of tenable.io scans.py #810

Closed
megavexus opened this issue Jul 6, 2024 · 1 comment · Fixed by #837
Closed
Labels
bug This is a bug with the pyTenable library Tenable.io Tenable.io Package

Comments

@megavexus
Copy link

Describe the bug
Sin this change, a few weeks ago, the method "list" of "scans.py" of "Tenable IO" is not working with the parameter "last_modified".
imagen

To Reproduce
Steps to reproduce the behavior:

  1. Call the method "list" of scans.py of the library "io"
  2. Add a paramether with a datetime:
list_scans = api.scans.list(
            last_modified=datetime.today()
)
  1. See error:
  File "XXXX/site-packages/tenable/io/scans.py", line 1205, in list
    lm = int(time.mktime(last_modified).timetuple())
AttributeError: 'float' object has no attribute 'timetuple'

Expected behavior
A clear and concise description of what you expected to happen.

System Information (please complete the following information):

  • OS: Ubuntu budgie
  • Architecture: 64bit
  • Version 22.04
  • Memory 16GB

Additional context
To fix it, you only have to replace the affected line with:

     lm = int(time.mktime(start_time.timetuple()))
@SteveMcGrath
Copy link
Contributor

As you are already aware of the issue and the fix, do you want to file a PR to fix as well?

@SteveMcGrath SteveMcGrath added bug This is a bug with the pyTenable library Tenable.io Tenable.io Package labels Jul 8, 2024
SteveMcGrath added a commit that referenced this issue Sep 17, 2024
SteveMcGrath added a commit that referenced this issue Sep 17, 2024
SteveMcGrath added a commit that referenced this issue Sep 17, 2024
SteveMcGrath added a commit that referenced this issue Sep 17, 2024
SteveMcGrath added a commit that referenced this issue Sep 17, 2024
SteveMcGrath added a commit that referenced this issue Sep 17, 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 Tenable.io Tenable.io Package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants