Graceful exit for views

This commit is contained in:
snarez 2013-07-05 04:37:09 +10:00
parent 0d8188b457
commit 342750ca14
1 changed files with 3 additions and 2 deletions

View File

@ -131,6 +131,7 @@ def main(debugger=None, dict=None):
except KeyboardInterrupt:
pass
inst.cleanup()
log.info('Exiting')
#
@ -490,10 +491,10 @@ class Client (asyncore.dispatcher):
try:
msg = pickle.loads(data)
log.debug('Received message: ' + str(msg))
if self.view:
self.view.render(msg)
except:
log.debug('Invalid message: ' + data)
if self.view:
self.view.render(msg)
# Parent class for all views