From 28a4883a72e7a8190375d31c530f072fc0501dc8 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 20 Jan 2008 01:00:39 +0000 Subject: [PATCH] Fix signals. --- deluge/core/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deluge/core/core.py b/deluge/core/core.py index 1a7ecd9aa..ded1ea0a8 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -94,7 +94,6 @@ class Core( SimpleXMLRPCServer.SimpleXMLRPCServer): def __init__(self, port): log.debug("Core init..") - #threading.Thread.__init__(self) self.client_address = None @@ -248,7 +247,10 @@ class Core( gobject.threads_init() self.loop = gobject.MainLoop() - self.loop.run() + try: + self.loop.run() + except KeyboardInterrupt: + self._shutdown() def _shutdown(self, data=None): """This is called by a thread from shutdown()"""