summaryrefslogtreecommitdiffstats
path: root/module/web/cnl_app.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-04 19:56:19 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-04 19:56:19 +0100
commit35daa21f669c4f522b4e6785f6a3281714684671 (patch)
tree015d86021d0172b08990a6477f9ff9f427d89fb4 /module/web/cnl_app.py
parentfixes (diff)
downloadpyload-35daa21f669c4f522b4e6785f6a3281714684671.tar.xz
CNL fixes
Diffstat (limited to 'module/web/cnl_app.py')
-rw-r--r--module/web/cnl_app.py6
1 files changed, 4 insertions, 2 deletions
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()