Skip to content

Commit

Permalink
fix(api): strip trailing newlines when reading hash from file
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jun 27, 2023
1 parent e3a458a commit 16cf5bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/onnx_web/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 16cf5bb

Please sign in to comment.