1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-10 14:15:43 +00:00

rcompress: fix error handling with Ctrl-C

This commit is contained in:
Thomas Waldmann 2024-07-15 00:48:22 +02:00
parent 10b38789d6
commit 0ae65a08c4
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -4,7 +4,7 @@ from collections import defaultdict
from ._common import with_repository, Highlander
from ..constants import * # NOQA
from ..compress import CompressionSpec, ObfuscateSize, Auto, COMPRESSOR_TABLE
from ..helpers import sig_int, ProgressIndicatorPercent
from ..helpers import sig_int, ProgressIndicatorPercent, Error
from ..manifest import Manifest
@ -150,7 +150,7 @@ class RCompressMixIn:
pi.finish()
if sig_int:
# Ctrl-C / SIGINT: do not checkpoint (commit) again, we already have a checkpoint in this case.
self.print_error("Got Ctrl-C / SIGINT.")
raise Error("Got Ctrl-C / SIGINT.")
elif uncommitted_chunks > 0:
checkpoint_func()
if args.stats: