File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
cve_bin_tool/data_sources Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ async def fetch_cves(self):
420420 tasks = [
421421 self .cache_update (self .session , url , meta ["sha256" ])
422422 for url , meta in nvd_metadata .items ()
423- if meta is not None
423+ if meta is not None and meta . get ( "sha256" ) is not None
424424 ]
425425
426426 total_tasks = len (tasks )
@@ -579,6 +579,9 @@ async def cache_update(
579579 # Raise for all other 4xx errors
580580 response .raise_for_status ()
581581 gzip_data = await response .read ()
582+ if len (gzip_data ) == 0 :
583+ self .LOGGER .debug (f"Missing data for { filename } " )
584+ return
582585 json_data = gzip .decompress (gzip_data )
583586 gotsha = hashlib .sha256 (json_data ).hexdigest ().upper ()
584587 async with FileIO (filepath , "wb" ) as filepath_handle :
You can’t perform that action at this time.
0 commit comments