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:
@ -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():
|
||||
|
Reference in New Issue
Block a user