|
From: <di...@us...> - 2010-11-19 17:17:43
|
Revision: 698
http://safekeep.svn.sourceforge.net/safekeep/?rev=698&view=rev
Author: dimi
Date: 2010-11-19 17:17:37 +0000 (Fri, 19 Nov 2010)
Log Message:
-----------
Cleanup error handling
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2010-11-19 17:01:47 UTC (rev 697)
+++ safekeep/trunk/safekeep 2010-11-19 17:17:37 UTC (rev 698)
@@ -778,6 +778,7 @@
should_cleanup = True
bdir = '/'
cfg = do_client_config_parse('<backup/>', 'def')
+ ex = None
try:
while True:
try:
@@ -813,12 +814,14 @@
send('ERROR Unknown command: %s' % line)
break
except Exception, e:
- traceback.print_exc(file=sys.stdout)
- send('ERROR %s' % e)
+ ex = e
+ break
finally:
if should_cleanup:
do_client_cleanup(cfg, bdir)
+ if ex:
+ send('ERROR %s' % (ex or ''))
######################################################################
# Server implementation
@@ -1482,8 +1485,7 @@
else:
assert False, 'Unknown mode: %s' % (mode)
except Exception, ex:
- traceback.print_exc(file=sys.stdout)
- error('ERROR: %s' % ex)
+ error('ERROR: %s' % (ex or ''))
if email and not noemail:
send_notification(email, smtp)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|