From 35daa21f669c4f522b4e6785f6a3281714684671 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 4 Feb 2011 19:56:19 +0100 Subject: CNL fixes --- module/web/cnl_app.py | 6 ++++-- module/web/webinterface.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'module/web') diff --git a/module/web/cnl_app.py b/module/web/cnl_app.py index 058a298d3..34ddc6ac2 100644 --- a/module/web/cnl_app.py +++ b/module/web/cnl_app.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- from os.path import join import re +from traceback import print_exc from urllib import unquote from base64 import standard_b64decode from binascii import unhexlify @@ -27,9 +28,10 @@ def local_check(function): @route("/flash") +@route("/flash/:id") @route("/flash", method="POST") @local_check -def flash(): +def flash(id="0"): return "JDownloader" @route("/flash/add", method="POST") @@ -50,7 +52,7 @@ def addcrypted(): dlc = request.forms['crypted'].replace(" ", "+") dlc_path = join(DL_ROOT, package.replace("/", "").replace("\\", "").replace(":", "") + ".dlc") - dlc_file = file(dlc_path, "wb") + dlc_file = open(dlc_path, "wb") dlc_file.write(dlc) dlc_file.close() diff --git a/module/web/webinterface.py b/module/web/webinterface.py index 15948666e..52488ea20 100644 --- a/module/web/webinterface.py +++ b/module/web/webinterface.py @@ -72,7 +72,7 @@ from module.JsEngine import JsEngine JS = JsEngine() TEMPLATE = config.get('webinterface', 'template') -DL_ROOT = join(PYLOAD_DIR, config.get('general', 'download_folder')) +DL_ROOT = config.get('general', 'download_folder') LOG_ROOT = join(PYLOAD_DIR, config.get('log', 'log_folder')) DEBUG = config.get("general","debug_mode") bottle.debug(DEBUG) -- cgit v1.2.3