Fix Tenable and Nessus scan listing (#162)

* Prevent multiple requests to nessus scans endpoint

* Remove unnecessary call
This commit is contained in:
pemontto
2019-04-01 19:04:12 +11:00
committed by Quim Montal
parent 383e7f5478
commit 9619a47d7a
2 changed files with 3 additions and 3 deletions

View File

@ -53,6 +53,7 @@ class NessusAPI(object):
}
self.login()
self.scans = self.get_scans()
self.scan_ids = self.get_scan_ids()
def login(self):
@ -113,7 +114,7 @@ class NessusAPI(object):
return scans
def get_scan_ids(self):
scans = self.get_scans()
scans = self.scans
scan_ids = [scan_id['id'] for scan_id in scans['scans']] if scans['scans'] else []
self.logger.debug('Found {} scan_ids'.format(len(scan_ids)))
return scan_ids