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):
420
420
tasks = [
421
421
self .cache_update (self .session , url , meta ["sha256" ])
422
422
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
424
424
]
425
425
426
426
total_tasks = len (tasks )
@@ -579,6 +579,9 @@ async def cache_update(
579
579
# Raise for all other 4xx errors
580
580
response .raise_for_status ()
581
581
gzip_data = await response .read ()
582
+ if len (gzip_data ) == 0 :
583
+ self .LOGGER .debug (f"Missing data for { filename } " )
584
+ return
582
585
json_data = gzip .decompress (gzip_data )
583
586
gotsha = hashlib .sha256 (json_data ).hexdigest ().upper ()
584
587
async with FileIO (filepath , "wb" ) as filepath_handle :
You can’t perform that action at this time.
0 commit comments