diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-14 15:17:07 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-14 15:17:07 +0100 |
commit | 1ecd9254b361d4e026e7a25f1b47382d1015e63c (patch) | |
tree | 183e5215126435b5b9bc986d86e616bafccb1645 /module/web | |
parent | some parts of cli working again (diff) | |
download | pyload-1ecd9254b361d4e026e7a25f1b47382d1015e63c.tar.xz |
default thrift backend
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/ServerThread.py | 7 | ||||
-rw-r--r-- | module/web/webinterface.py | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py index 297eb2f8f..9af888c6e 100644 --- a/module/web/ServerThread.py +++ b/module/web/ServerThread.py @@ -1,6 +1,7 @@ #!/usr/bin/env python from __future__ import with_statement -from os.path import exists +from os import makedirs +from os.path import exists, join import threading import logging @@ -27,6 +28,10 @@ class WebServer(threading.Thread): import webinterface global webinterface + cache = join("tmp", "jinja_cache") + if not exists(cache): + makedirs(cache) + if self.https: if not exists(self.cert) or not exists(self.key): log.warning(_("SSL certificates not found.")) diff --git a/module/web/webinterface.py b/module/web/webinterface.py index dd5920486..ef5046f44 100644 --- a/module/web/webinterface.py +++ b/module/web/webinterface.py @@ -85,9 +85,6 @@ LOG_ROOT = config.get('log', 'log_folder') DEBUG = config.get("general","debug_mode") bottle.debug(DEBUG) -if not exists(join("tmp", "jinja_cache")): - makedirs(join("tmp", "jinja_cache")) - bcc = FileSystemBytecodeCache(join("tmp","jinja_cache")) loader = PrefixLoader({ "default": FileSystemLoader(join(PROJECT_DIR, "templates", "jinja", "default")) @@ -112,7 +109,7 @@ from beaker.middleware import SessionMiddleware session_opts = { 'session.type': 'file', - # 'session.cookie_expires': -1, + 'session.cookie_expires': False, 'session.data_dir': './tmp', 'session.auto': False } |