summaryrefslogtreecommitdiffstats
path: root/pyload/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-19 20:15:06 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-19 20:15:06 +0200
commit6c79071a755881a5912fe0bae37160b2c9735525 (patch)
treeeeb36a4ed781051f62eb344ebfd9b0c21106d040 /pyload/web
parentnew plugin type and refactored request classes (diff)
downloadpyload-6c79071a755881a5912fe0bae37160b2c9735525.tar.xz
try to fix bug when refreshing page
Diffstat (limited to 'pyload/web')
-rw-r--r--pyload/web/pyload_app.py11
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>')