2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 02:55:41 +00:00

Use hashlib.file_digest

This commit is contained in:
Oliver Walters
2024-11-19 22:07:49 +00:00
parent ff7f8d8027
commit bf84c8155e

View File

@ -113,7 +113,9 @@ def plugins_file_hash():
return None
with pf.open('rb') as f:
return hashlib.sha256(f.read()).hexdigest()
digest = hashlib.file_digest(f, 'sha256')
return digest.hexdigest()
def install_plugins_file():