summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-20 20:54:30 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-20 20:54:30 +0100
commitc003c8a342cbe9609f8e6b21669a8b4a90a213bf (patch)
tree1cf1fc6001f97d5299c11fad4b7581e00c158911 /pyLoadCore.py
parentfixed file_list, clean exit? (diff)
downloadpyload-c003c8a342cbe9609f8e6b21669a8b4a90a213bf.tar.xz
fixed file_list again, webserver terminates correctly when killing pyload over xmlrpc
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index fbce78aaf..50c5d2c55 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -158,8 +158,11 @@ class Core(object):
while True:
sleep(2)
- if self.do_kill:
- raise KeyboardInterrupt
+ if self.do_kill:
+ self.logger.info("pyLoad quits")
+ self.webserver.quit()
+ self.webserver.join()
+ exit()
def init_server(self):
try:
@@ -421,12 +424,12 @@ class ServerMethods():
try:
self.core.file_list.collector.removeFile(id)
except:
- self.core.file_list.packages.removeFile(id)
+ self.core.file_list.packager.removeFile(id)
self.core.file_list.save()
def del_packages(self, ids):
for id in ids:
- self.core.file_list.packages.removePackage(id)
+ self.core.file_list.packager.removePackage(id)
self.core.file_list.save()
def kill(self):
@@ -488,6 +491,6 @@ if __name__ == "__main__":
try:
pyload_core.start()
except KeyboardInterrupt:
- pyload_core.logger.info("killed pyLoad")
+ pyload_core.logger.info("killed pyLoad by Terminal")
exit()