Skip to content

Commit 3b65c22

Browse files
committed
metadata API: Tweak exception message on sign failure
I still don't know how we should handle failures in signing (maybe just let all of the weird exceptions raise instead of wrapping them) but this makes the wrapping error at least a bit more useful. Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 8f95162 commit 3b65c22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tuf/api/metadata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def sign(
384384
try:
385385
signature = signer.sign(bytes_data)
386386
except Exception as e:
387-
raise UnsignedMetadataError("Problem signing the metadata") from e
387+
raise UnsignedMetadataError(f"Failed to sign: {e}") from e
388388

389389
if not append:
390390
self.signatures.clear()

0 commit comments

Comments
 (0)