1
0
Fork 0

fix(api): strip trailing newlines when reading hash from file

This commit is contained in:
Sean Sube 2023-06-27 07:33:23 -05:00
parent e3a458a736
commit 16cf5bb863
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ def str_params(
model_hash_path = path.join(params.model, "hash.txt")
if path.exists(model_hash_path):
with open(model_hash_path, "r") as f:
model_hash = f.readline()
model_hash = f.readline().rstrip(",. \n\t\r")
model_hash = model_hash or "unknown"
hash_map = {