From: Gabriel Filion Date: Tue, 27 Jul 2010 17:28:49 +0000 (-0400) Subject: cmd/ftp: exit cleanly on Ctrl-C X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=28fa92f1462f41c1072773c83183d32ca508979e;p=packages%2Fb%2Fbup.git cmd/ftp: exit cleanly on Ctrl-C 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. --- diff --git a/cmd/ftp-cmd.py b/cmd/ftp-cmd.py index 253b7ac..f61b1ee 100755 --- a/cmd/ftp-cmd.py +++ b/cmd/ftp-cmd.py @@ -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