fix Bluescreen, when a external ip configured in E2 is not 'listenable'
authorRico Schulte <ricoschulte@users.schwerkraft.elitedvb.net>
Fri, 22 Jun 2007 08:16:14 +0000 (08:16 +0000)
committerRico Schulte <ricoschulte@users.schwerkraft.elitedvb.net>
Fri, 22 Jun 2007 08:16:14 +0000 (08:16 +0000)
webinterface/src/plugin.py

index 58aa689..753b76f 100644 (file)
@@ -77,7 +77,10 @@ def startWebserver(session):
                if nw.ifaces[adaptername]['up'] is True:
                        extip = "%i.%i.%i.%i"%(extip[0],extip[1],extip[2],extip[3])
                        print "[WebIf] starting Webinterface on port %s on interface %s with address %s"%(str(config.plugins.Webinterface.port.value),adaptername,extip)
-                       reactor.listenTCP(config.plugins.Webinterface.port.value, channel.HTTPFactory(site),interface=extip)
+                       try:
+                               reactor.listenTCP(config.plugins.Webinterface.port.value, channel.HTTPFactory(site),interface=extip)
+                       except Exception,e:
+                               print "[WebIf] Error starting Webinterface on port %s on interface %s with address %s,because \n%s"%(str(config.plugins.Webinterface.port.value),adaptername,extip,e)
                else:
                        print "[WebIf] found configured interface %s, but it is not running. so not starting a server on it ..." % adaptername