aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/verify-checksum-models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/verify-checksum-models.py b/scripts/verify-checksum-models.py
index 2ce5728..d127482 100644
--- a/scripts/verify-checksum-models.py
+++ b/scripts/verify-checksum-models.py
@@ -1,9 +1,10 @@
import os
import hashlib
+
def sha256sum(file):
block_size = 16 * 1024 * 1024 # 16 MB block size
- b = bytearray(block_size)
+ b = bytearray(block_size)
file_hash = hashlib.sha256()
mv = memoryview(b)
with open(file, 'rb', buffering=0) as f:
@@ -15,6 +16,7 @@ def sha256sum(file):
return file_hash.hexdigest()
+
# Define the path to the llama directory (parent folder of script directory)
llama_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))