mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-01 03:00:13 -04:00
Encode the hash input as ascii if needed (windows only?)
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -16,7 +16,10 @@ import glob
|
||||
json_options = {'indent' : 2, 'sort_keys' : True}
|
||||
|
||||
def get_hash(data):
|
||||
return hashlib.sha224(data).hexdigest()
|
||||
try:
|
||||
return hashlib.sha224(data).hexdigest()
|
||||
except TypeError:
|
||||
return hashlib.sha224(data.encode('ascii')).hexdigest()
|
||||
|
||||
# unicode
|
||||
repo_root_path = os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..'))
|
||||
|
||||
Reference in New Issue
Block a user