From 9334bc1feebd0f5b7ac314398f2f07e0be72bc34 Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Fri, 20 Dec 2024 14:56:30 +0100 Subject: [PATCH] support components with no premade hashes --- scripts/download_hash.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/download_hash.py b/scripts/download_hash.py index c0c745b01..be55a714c 100644 --- a/scripts/download_hash.py +++ b/scripts/download_hash.py @@ -12,6 +12,7 @@ from collections import defaultdict from functools import cache import argparse import requests +import hashlib from ruamel.yaml import YAML from packaging.version import Version, InvalidVersion @@ -217,6 +218,8 @@ def download_hash(only_downloads: [str]) -> None: ), allow_redirects=True) hash_file.raise_for_status() + if downloads[component].get('binary', False): + return hashlib.sha256(hash_file.content).hexdigest() return (hash_file.content.decode().split()[0])