hashlib fix from razer

This commit is contained in:
Matthias Urlichs committed 2019-01-28 07:50:54 +01:00
1 parent 6bab550830
commit e4d083028c
12 files changed
+125 -120

No files matched your search

+6 -3
View File
@@ -30,9 +30,12 @@ def _etag(lm=None):
import hashlib
hash = hashlib.sha1()
hash.update(str(lm))
hash.update(repr(printerProfileManager.get_default()))
hash.update(repr(printerProfileManager.get_current()))
def hash_update(value):
value = value.encode('utf-8')
hash.update(value)
hash_update(str(lm))
hash_update(repr(printerProfileManager.get_default()))
hash_update(repr(printerProfileManager.get_current()))
return hash.hexdigest()