Update libarchive error handling; improve error message formatting

This commit is contained in:
tke
2024-03-25 11:14:06 +01:00
parent f2d8f4ff71
commit 26d62c0887

View File

@@ -31,4 +31,4 @@ for infile in args.infile:
try:
hash_files_in_archive(infile)
except libarchive.exception.ArchiveError as e:
sys.stderr.write(f'Failed to open archive file {infile}: {e}\n')
print(f'Failed to open archive file {infile}: {e}\n', file=sys.stderr)