From: Avery Pennarun Date: Tue, 8 Jun 2010 03:51:54 +0000 (-0400) Subject: cmd/{random,split}: call handle_ctrl_c() for cleaner keyboard interrupts. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d6168fb14ea51f0fe308017153249dc259be1320;p=packages%2Fb%2Fbup.git cmd/{random,split}: call handle_ctrl_c() for cleaner keyboard interrupts. Signed-off-by: Avery Pennarun --- diff --git a/cmd/random-cmd.py b/cmd/random-cmd.py index 34035d5..7e3eaa4 100755 --- a/cmd/random-cmd.py +++ b/cmd/random-cmd.py @@ -17,6 +17,8 @@ if len(extra) != 1: total = parse_num(extra[0]) +handle_ctrl_c() + if opt.force or (not os.isatty(1) and not atoi(os.environ.get('BUP_FORCE_TTY')) & 1): _hashsplit.write_random(sys.stdout.fileno(), total, opt.seed or 0) diff --git a/cmd/split-cmd.py b/cmd/split-cmd.py index b065892..2addf24 100755 --- a/cmd/split-cmd.py +++ b/cmd/split-cmd.py @@ -26,6 +26,7 @@ bwlimit= maximum bytes/sec to transmit to server o = options.Options('bup split', optspec) (opt, flags, extra) = o.parse(sys.argv[1:]) +handle_ctrl_c() git.check_repo_or_die() if not (opt.blobs or opt.tree or opt.commit or opt.name or opt.noop or opt.copy):