Skip to content
Snippets Groups Projects
Commit 20fdda2d authored by Campbell Barton's avatar Campbell Barton
Browse files

check_spelling: fix cache hashing (it wasn't working at all)

parent 0ec3e26c
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# ##### BEGIN GPL LICENSE BLOCK ##### # ##### BEGIN GPL LICENSE BLOCK #####
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
...@@ -66,7 +68,9 @@ def hash_of_file_and_len(fp): ...@@ -66,7 +68,9 @@ def hash_of_file_and_len(fp):
import hashlib import hashlib
with open(fp, 'rb') as fh: with open(fp, 'rb') as fh:
data = fh.read() data = fh.read()
return hashlib.sha512().digest(), len(data) m = hashlib.sha512()
m.update(data)
return m.digest(), len(data)
import re import re
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment