]> arthur.barton.de Git - bup.git/commitdiff
cmd/{random,split}: call handle_ctrl_c() for cleaner keyboard interrupts.
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 8 Jun 2010 03:51:54 +0000 (23:51 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 8 Jun 2010 04:00:24 +0000 (00:00 -0400)
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
cmd/random-cmd.py
cmd/split-cmd.py

index 34035d57cda3ad7160f9af93ea23d2dae66f0c20..7e3eaa4cad6fab5f8842eb53767b09aab04344ed 100755 (executable)
@@ -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)
index b065892f12af0e1c3c6b6c66464bfb8f6957c30a..2addf24014aa052024903a45b4292b91b6cef6d6 100755 (executable)
@@ -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):