Skip to content

Commit

Permalink
Temp exception for incorrect VirusTotal data
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Oct 17, 2024
1 parent 991f932 commit a1d9deb
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions data/upd05_group_by_filename.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,40 @@ def update_file_info(existing_file_info, new_file_info, new_file_info_source):
if new_file_info is None:
return existing_file_info

# temp {
sha256 = new_file_info.get('sha256')
if sha256 in [
'c61d63caa9275cc8ee9c6681d10c8fbe223b97b01947a3e091381bcdd03a7bcb',
'5c47880edfacd7eaf087fb292494a5e440006c30e3913ca5ea256b8626732e53',
]:
assert sha256 == existing_file_info['sha256']
if new_file_info == existing_file_info:
return existing_file_info

assert 'version' not in existing_file_info
assert 'description' not in existing_file_info

existing_file_info_enriched = existing_file_info.copy()
if 'version' in new_file_info:
existing_file_info_enriched['version'] = new_file_info['version']
if 'description' in new_file_info:
existing_file_info_enriched['description'] = new_file_info['description']

if (
existing_file_info_enriched.get('signingStatus') == 'Unsigned'
and new_file_info.get('signingStatus') == 'Signed'
and new_file_info.get('signatureType') == 'Catalog file'
):
existing_file_info_enriched['signingStatus'] = 'Signed'
existing_file_info_enriched['signatureType'] = 'Catalog file'

assert new_file_info == existing_file_info_enriched, (
existing_file_info,
new_file_info,
)
return new_file_info
# }

assert_file_info_close_enough(existing_file_info, new_file_info)

if new_file_info_source == 'iso':
Expand Down

0 comments on commit a1d9deb

Please sign in to comment.