From 91c3f94ff9df319b548cd332566198b72f8124cd Mon Sep 17 00:00:00 2001 From: jchu Date: Sun, 26 Dec 2004 20:12:46 +0000 Subject: commited neotuli's patch for source links --- tupkg/client/tupkg | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tupkg/client') diff --git a/tupkg/client/tupkg b/tupkg/client/tupkg index a96923e0..380dc53f 100755 --- a/tupkg/client/tupkg +++ b/tupkg/client/tupkg @@ -159,17 +159,21 @@ def main(argv=None): return 1 cs = ClientSocket(files, confdict['host'], confdict['port'], confdict['user'], confdict['password']) - cs.connect() + try: + cs.connect() - if not cs.auth(): - print "Error authenticating you, you bastard" - return 1 + if not cs.auth(): + print "Error authenticating you, you bastard" + return 1 - cs.sendFileMeta() + cs.sendFileMeta() - cs.sendFiles() + cs.sendFiles() - cs.close() + cs.close() + except KeyboardInterrupt: + print "Cancelling" + cs.close() return 0 -- cgit v1.2.3-24-g4f1b