Skip to content

Commit bf84c81

Browse files
Use hashlib.file_digest
1 parent ff7f8d8 commit bf84c81

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/backend/InvenTree/plugin/installer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ def plugins_file_hash():
113113
return None
114114

115115
with pf.open('rb') as f:
116-
return hashlib.sha256(f.read()).hexdigest()
116+
digest = hashlib.file_digest(f, 'sha256')
117+
118+
return digest.hexdigest()
117119

118120

119121
def install_plugins_file():

0 commit comments

Comments
 (0)