diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-04-03 11:06:18 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-04-03 11:06:18 +0200 |
commit | 44941dd9b11d9140589f7b1eacb9baf2a82d4c8b (patch) | |
tree | dd5c3ea532746bb6eae3ff9b7991165b6e5254af /module/web/settings.py | |
parent | merged (diff) | |
download | pyload-44941dd9b11d9140589f7b1eacb9baf2a82d4c8b.tar.xz |
webif settings page
Diffstat (limited to 'module/web/settings.py')
-rw-r--r-- | module/web/settings.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/module/web/settings.py b/module/web/settings.py index bbea1690b..3ab5ff20e 100644 --- a/module/web/settings.py +++ b/module/web/settings.py @@ -6,7 +6,6 @@ TEMPLATE_DEBUG = DEBUG import os.path
import sys
-import xmlrpclib
SERVER_VERSION = "0.3.2"
@@ -22,13 +21,19 @@ config = XMLConfigParser(os.path.join(PYLOAD_DIR,"module","config","core.xml")) #DEBUG = config.get("general","debug")
+try:
+ import module.web.ServerThread
+ if not module.web.ServerThread.core:
+ raise Exception
+ PYLOAD = module.web.ServerThread.core.server_methods
+except:
+ import xmlrpclib
+ ssl = ""
-ssl = ""
+ if config.get("ssl", "activated"):
+ ssl = "s"
-if config.get("ssl", "activated"):
- ssl = "s"
-
-server_url = "http%s://%s:%s@%s:%s/" % (
+ server_url = "http%s://%s:%s@%s:%s/" % (
ssl,
config.get("remote", "username"),
config.get("remote", "password"),
@@ -36,7 +41,8 @@ server_url = "http%s://%s:%s@%s:%s/" % ( config.get("remote", "port")
)
-PYLOAD = xmlrpclib.ServerProxy(server_url, allow_none=True)
+ PYLOAD = xmlrpclib.ServerProxy(server_url, allow_none=True)
+
TEMPLATE = config.get('webinterface','template')
DL_ROOT = os.path.join(PYLOAD_DIR, config.get('general','download_folder'))
|