We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a862342 commit cdf5ac3Copy full SHA for cdf5ac3
src/c2pa/c2pa.py
@@ -2269,10 +2269,11 @@ def sign_file(self,
2269
2270
try:
2271
# Open source file and destination file, then use the sign method
2272
- with open(source_path, 'rb') as source_file, open(dest_path, 'w+b') as dest_file:
+ with open(source_path, 'rb') as source_file, \
2273
+ open(dest_path, 'w+b') as dest_file:
2274
return self.sign(signer, mime_type, source_file, dest_file)
2275
except Exception as e:
- raise C2paError(f"Error signing file: {str(e)}")
2276
+ raise C2paError(f"Error signing file: {str(e)}") from e
2277
2278
2279
def format_embeddable(format: str, manifest_bytes: bytes) -> tuple[int, bytes]:
0 commit comments