summaryrefslogtreecommitdiffstats
path: root/pyload/web/ServerThread.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-11 23:33:12 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-11 23:33:12 +0200
commitfd11ed199c7ac88fd33e300812ea9faf2d70e088 (patch)
treeffab23ee09217e3f08e66db0b0687e0a55bf249e /pyload/web/ServerThread.py
parentseparated setup and paver (diff)
downloadpyload-fd11ed199c7ac88fd33e300812ea9faf2d70e088.tar.xz
working build-script, needs some improvements
Diffstat (limited to 'pyload/web/ServerThread.py')
-rw-r--r--pyload/web/ServerThread.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/pyload/web/ServerThread.py b/pyload/web/ServerThread.py
index 95a09bd80..c55ddef0f 100644
--- a/pyload/web/ServerThread.py
+++ b/pyload/web/ServerThread.py
@@ -11,6 +11,7 @@ core = None
setup = None
log = logging.getLogger("log")
+
class WebServer(threading.Thread):
def __init__(self, pycore=None, pysetup=None):
global core, setup
@@ -40,6 +41,7 @@ class WebServer(threading.Thread):
def run(self):
self.running = True
import webinterface
+
global webinterface
if self.https:
@@ -47,6 +49,11 @@ class WebServer(threading.Thread):
log.warning(_("SSL certificates not found."))
self.https = False
+ if webinterface.UNAVAILALBE:
+ log.warning(_("WebUI built is not available"))
+ elif webinterface.APP_PATH == "app":
+ log.info(_("Running webUI in development mode"))
+
prefer = None
# These cases covers all settings
@@ -128,11 +135,11 @@ class WebServer(threading.Thread):
else: # server is just a string
name = server
- log.info(_("Starting %(name)s webserver: %(host)s:%(port)d") % {"name": name, "host": self.host, "port": self.port})
+ log.info(
+ _("Starting %(name)s webserver: %(host)s:%(port)d") % {"name": name, "host": self.host, "port": self.port})
webinterface.run_server(host=self.host, port=self.port, server=server)
-
# check if an error was raised for n seconds
def check_error(self, n=1):
t = time() + n