Skip to content

Commit

Permalink
cmd/ftp: exit cleanly on Ctrl-C
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Gabriel Filion authored and apenwarr committed Jul 27, 2010
1 parent bfec086 commit 28fa92f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ftp-cmd.py
Expand Up @@ -3,6 +3,9 @@
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
Expand Down

0 comments on commit 28fa92f

Please sign in to comment.