summaryrefslogtreecommitdiffstats
path: root/module/web/WebServer.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-11-12 22:54:29 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-11-12 22:54:29 +0100
commitb7dff98c2e76b28422d40076273753b4216a819a (patch)
treee2a24cdde775792624f30b7c24624c7c57068209 /module/web/WebServer.py
parentshareonline.biz premium (diff)
downloadpyload-b7dff98c2e76b28422d40076273753b4216a819a.tar.xz
better exception handling for sockets
Diffstat (limited to 'module/web/WebServer.py')
-rw-r--r--module/web/WebServer.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/web/WebServer.py b/module/web/WebServer.py
index 5497439da..8cef0de2f 100644
--- a/module/web/WebServer.py
+++ b/module/web/WebServer.py
@@ -283,4 +283,8 @@ class WebServer(threading.Thread):
def run(self):
self.core.logger.info("Starting Webinterface on %s port %s" % (self.core.config['webinterface']['listenaddr'],self.core.config['webinterface']['port']))
- run(host=self.core.config['webinterface']['listenaddr'], port=int(self.core.config['webinterface']['port']), quiet=True)
+ try:
+ run(host=self.core.config['webinterface']['listenaddr'], port=int(self.core.config['webinterface']['port']), quiet=True)
+ except:
+ self.core.logger.error("Failed starting webserver, no webinterface available: Can't create socket")
+ exit()