summaryrefslogtreecommitdiffstats
path: root/module/gui
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-14 16:02:08 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-14 16:02:08 +0200
commite7c95267245d226f4966f055289b061dd1bc2f91 (patch)
treed8e537f9e4b838cbe0effc9763e652c8610642f8 /module/gui
parentfixes (diff)
downloadpyload-e7c95267245d226f4966f055289b061dd1bc2f91.tar.xz
more fixes
Diffstat (limited to 'module/gui')
-rw-r--r--module/gui/CNLServer.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/module/gui/CNLServer.py b/module/gui/CNLServer.py
index 7f7dc29ed..df9cd361d 100644
--- a/module/gui/CNLServer.py
+++ b/module/gui/CNLServer.py
@@ -45,11 +45,16 @@ class CNLServer(Thread):
self.setDaemon(True)
self.stop = False
- self.stopped = True
+ self.stopped = False
def run(self):
server_address = ('127.0.0.1', 9666)
- httpd = HTTPServer(server_address, CNLHandler)
+ try:
+ httpd = HTTPServer(server_address, CNLHandler)
+ except:
+ self.stopped = True
+ return
+
self.stopped = False
while self.keep_running():
httpd.handle_request()
@@ -212,9 +217,10 @@ if __name__ == "__main__":
s = CNLServer()
s.start()
- while not s.stop:
+ while not s.stopped:
try:
s.join(1)
except KeyboardInterrupt:
s.stop = True
+ s.stopped = True
print "quiting.." \ No newline at end of file