From 2d321f3c5930c4ed533ad9a4073b5e1b1f52fd09 Mon Sep 17 00:00:00 2001 From: tke Date: Mon, 25 Mar 2024 11:14:06 +0100 Subject: [PATCH] Update libarchive error handling; improve error message formatting --- tools/libarchivesum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libarchivesum.py b/tools/libarchivesum.py index b8bb348..fb1796a 100644 --- a/tools/libarchivesum.py +++ b/tools/libarchivesum.py @@ -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)