]> arthur.barton.de Git - bup.git/commitdiff
cmd/ftp: exit cleanly on Ctrl-C
authorGabriel Filion <lelutin@gmail.com>
Tue, 27 Jul 2010 17:28:49 +0000 (13:28 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 27 Jul 2010 18:15:12 +0000 (14:15 -0400)
bup ftp currently does not handle KeyboardInterrupt exceptions.

Simply call handle_ctrl_c() at the beginning of the file to make the
command exit without a stacktrace.

cmd/ftp-cmd.py

index 253b7acffc20c553f1e9ddb24e77481b87295810..f61b1eef13c4665a69d46f993d20c9a0e3a130a5 100755 (executable)
@@ -3,6 +3,9 @@ import sys, os, re, stat, fnmatch
 from bup import options, git, shquote, vfs
 from bup.helpers import *
 
+handle_ctrl_c()
+
+
 def node_name(text, n):
     if stat.S_ISDIR(n.mode):
         return '%s/' % text