Update libarchive error handling; improve error message formatting

This commit is contained in:
tke
2024-03-25 11:14:06 +01:00
parent 5352d93fae
commit 2d321f3c59

View File

@@ -31,4 +31,4 @@ for infile in args.infile:
try: try:
hash_files_in_archive(infile) hash_files_in_archive(infile)
except libarchive.exception.ArchiveError as e: 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)