253 db = self.__fetchVulnerabilityDatabase() |
253 db = self.__fetchVulnerabilityDatabase() |
254 if not db: |
254 if not db: |
255 return VulnerabilityCheckError.SummaryDbUnavailable, [] |
255 return VulnerabilityCheckError.SummaryDbUnavailable, [] |
256 |
256 |
257 fullDb = None |
257 fullDb = None |
258 vulnerablePackages = frozenset(db.keys()) |
258 vulnerablePackages = frozenset(db) |
259 vulnerabilities = collections.defaultdict(list) |
259 vulnerabilities = collections.defaultdict(list) |
260 |
260 |
261 for package in packages: |
261 for package in packages: |
262 # normalize the package name, the safety-db is converting |
262 # normalize the package name, the safety-db is converting |
263 # underscores to dashes and uses lowercase |
263 # underscores to dashes and uses lowercase |