summaryrefslogtreecommitdiffstats
path: root/pyload/web/setup_app.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-09-29 13:03:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-09-29 13:03:17 +0200
commit6a997661dc5c259f844531382a90a4ca120f1233 (patch)
tree085a76d4bac208963649a62f9393e0c0b049e869 /pyload/web/setup_app.py
parentrewritten decrypter and info fetching thread (diff)
downloadpyload-6a997661dc5c259f844531382a90a4ca120f1233.tar.xz
basics for web setup
Diffstat (limited to 'pyload/web/setup_app.py')
-rw-r--r--pyload/web/setup_app.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyload/web/setup_app.py b/pyload/web/setup_app.py
index cd44ad08e..5163f9cc6 100644
--- a/pyload/web/setup_app.py
+++ b/pyload/web/setup_app.py
@@ -1,10 +1,14 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from time import time
+
from bottle import route, request, response, HTTPError, redirect
from webinterface import PROJECT_DIR, SETUP
+from utils import add_json_header
+
def setup_required(func):
def _view(*args, **kwargs):
# setup needs to be running
@@ -14,6 +18,9 @@ def setup_required(func):
return func(*args, **kwargs)
return _view
+# setup will close after inactivity
+TIMEOUT = 15
+timestamp = time()
@route("/setup")
@setup_required