Skip to content

Commit

Permalink
fix: ensure verify terminates on model validation failure
Browse files Browse the repository at this point in the history
Signed-off-by: Janine Olear <[email protected]>
  • Loading branch information
miyunari committed Jan 27, 2025
1 parent d1cc550 commit b914c4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import logging
import pathlib
import sys
import os

from model_signing import model
from model_signing.hashing import file
Expand Down Expand Up @@ -169,7 +170,7 @@ def hasher_factory(file_path: pathlib.Path) -> file.FileHasher:
)
except verifying.VerificationError as err:
log.error(f"verification failed: {err}")
sys.exit(-1)
os._exit(-1)

log.info("all checks passed")

Expand Down

0 comments on commit b914c4d

Please sign in to comment.