diff options
Diffstat (limited to 'pyload')
-rw-r--r-- | pyload/web/pyload_app.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pyload/web/pyload_app.py b/pyload/web/pyload_app.py index 2f6211621..7202c319b 100644 --- a/pyload/web/pyload_app.py +++ b/pyload/web/pyload_app.py @@ -49,11 +49,14 @@ def index(): # TODO show different page pass - f = server_static('index.html') - content = f.body.read() - f.body = template(content, ws=PYLOAD.getWSAddress(), web=PYLOAD.getConfigValue('webinterface', 'port')) + resp = server_static('index.html') - return f + # Render variables into the html page + if resp.status_code == 200: + content = resp.body.read() + resp.body = template(content, ws=PYLOAD.getWSAddress(), web=PYLOAD.getConfigValue('webinterface', 'port')) + + return resp # Very last route that is registered, could match all uris @route('/<path:path>') |