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 cc3f10f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import argparse
import logging
import os
import pathlib
import sys

from model_signing import model
from model_signing.hashing import file
Expand Down Expand Up @@ -169,7 +169,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 cc3f10f

Please sign in to comment.