Do encode/decode stuff

This commit is contained in:
Jeff Tratner
2018-04-03 13:01:45 -07:00
parent cb895aa94e
commit 3f8f306caf
+2 -1
View File
@@ -55,9 +55,10 @@ class HashCache(SafeFileCache):
hash_value = self.get(location.url)
if not hash_value:
hash_value = self._get_file_hash(location)
hash_value = hash_value.encode('utf8')
if can_hash:
self.set(location.url, hash_value)
return hash_value
return hash_value.decode('utf8')
def _get_file_hash(self, location):
h = hashlib.new(FAVORITE_HASH)