From ff9a9560fef2d4a977a994d967e2848c1b62d206 Mon Sep 17 00:00:00 2001
From: mkaay <mkaay@mkaay.de>
Date: Sun, 20 Dec 2009 20:00:40 +0100
Subject: fixed file_list, clean exit?

---
 module/file_list.py | 2 ++
 pyLoadCore.py       | 7 +++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/module/file_list.py b/module/file_list.py
index efe45c044..9d4c090d1 100644
--- a/module/file_list.py
+++ b/module/file_list.py
@@ -195,6 +195,8 @@ class File_List(object):
             try:
                 n, pyfile = collector._getFileFromID(id)
                 del collector.file_list.data["collector"][n]
+            except Exception, e:
+                raise Exception, e
             else:
                 return pyfile
             finally:
diff --git a/pyLoadCore.py b/pyLoadCore.py
index e7911a65b..fbce78aaf 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -158,9 +158,8 @@ class Core(object):
 
         while True:
             sleep(2)
-            if self.do_kill:
-                self.logger.info("pyLoad quits")
-                exit()
+            if self.do_kill:
+                raise KeyboardInterrupt
 
     def init_server(self):
         try:
@@ -489,6 +488,6 @@ if __name__ == "__main__":
     try:
         pyload_core.start()
     except KeyboardInterrupt:
-        pyload_core.logger.info("killed pyLoad by Terminal")
+        pyload_core.logger.info("killed pyLoad")
         exit()
         
-- 
cgit v1.2.3