Skip to content

Commit

Permalink
[python] Add nice error message for ENOENT when measuring trusted files
Browse files Browse the repository at this point in the history
Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
  • Loading branch information
woju committed May 10, 2024
1 parent 25056d0 commit f8eda80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/gramine-sgx-sign
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ def main(ctx, with_, output, libpal, manifest_file, date, sigfile, depfile, verb

manifest = Manifest.load(manifest_file)

expanded = manifest.expand_all_trusted_files(chroot=chroot)
try:
expanded = manifest.expand_all_trusted_files(chroot=chroot)
except FileNotFoundError as err:
ctx.fail(f'Missing trusted file: {err.filename!r}')

with open(output, 'wb') as f:
manifest.dump(f)
Expand Down

0 comments on commit f8eda80

Please sign in to comment.