File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -839,7 +839,7 @@ def _verify_identity(args: argparse.Namespace) -> None:
839
839
)
840
840
841
841
print (f"OK: { file } " )
842
- except VerificationError as exc :
842
+ except Error as exc :
843
843
_logger .error (f"FAIL: { file } " )
844
844
exc .log_and_exit (_logger , args .verbose >= 1 )
845
845
@@ -896,7 +896,7 @@ def _verify_github(args: argparse.Namespace) -> None:
896
896
policy = policy_ ,
897
897
)
898
898
print (f"OK: { file } " )
899
- except VerificationError as exc :
899
+ except Error as exc :
900
900
_logger .error (f"FAIL: { file } " )
901
901
exc .log_and_exit (_logger , args .verbose >= 1 )
902
902
Original file line number Diff line number Diff line change 29
29
from sigstore_protobuf_specs .io .intoto import Envelope as _Envelope
30
30
from sigstore_protobuf_specs .io .intoto import Signature
31
31
32
- from sigstore .errors import VerificationError
32
+ from sigstore .errors import Error , VerificationError
33
33
from sigstore .hashes import Hashed
34
34
35
35
_logger = logging .getLogger (__name__ )
@@ -101,7 +101,7 @@ def __init__(self, contents: bytes) -> None:
101
101
try :
102
102
self ._inner = _Statement .model_validate_json (contents )
103
103
except ValidationError :
104
- raise ValueError ("malformed in-toto statement" )
104
+ raise Error ("malformed in-toto statement" )
105
105
106
106
def _matches_digest (self , digest : Hashed ) -> bool :
107
107
"""
@@ -181,7 +181,7 @@ def build(self) -> Statement:
181
181
predicate = self ._predicate ,
182
182
)
183
183
except ValidationError as e :
184
- raise ValueError (f"invalid statement: { e } " )
184
+ raise Error (f"invalid statement: { e } " )
185
185
186
186
return Statement (stmt .model_dump_json (by_alias = True ).encode ())
187
187
You can’t perform that action at this time.
0 commit comments