summaryrefslogtreecommitdiffstats
path: root/module/network/HTTPChunk.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-12-22 23:44:33 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-12-22 23:44:33 +0100
commitc66a630a502a5e118d8773b32820aca861ce32cd (patch)
treefa7b4c5d0f107fb2448a3f399041927182e098a5 /module/network/HTTPChunk.py
parentfinal cookie fix :D (diff)
downloadpyload-c66a630a502a5e118d8773b32820aca861ce32cd.tar.xz
new download backend integrated so far, downloading works, but still big todo list
Diffstat (limited to 'module/network/HTTPChunk.py')
-rw-r--r--module/network/HTTPChunk.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py
index 509ff3983..f26e681b6 100644
--- a/module/network/HTTPChunk.py
+++ b/module/network/HTTPChunk.py
@@ -22,6 +22,8 @@ from urllib2 import HTTPError
from helper import *
from time import sleep
from traceback import print_exc
+from module.plugins.Plugin import Abort
+from module.plugins.Plugin import Fail
class HTTPChunk(HTTPBase):
def __init__(self, url, fh, get={}, post={}, referer=None, cookies=True, customHeaders={}, range=None, bucket=None, interface=None, proxies={}):
@@ -109,11 +111,11 @@ class HTTPChunk(HTTPBase):
self.fh.close()
if self.abort:
- self.deferred.error("abort")
+ self.deferred.error(Abort)
elif self.size == self.arrived:
self.deferred.callback(resp)
else:
- self.deferred.error("wrong content lenght")
+ self.deferred.error(Fail)
def getEncoding(self):
try:
@@ -127,7 +129,6 @@ class HTTPChunk(HTTPBase):
if self.range:
self.customHeaders["Range"] = "bytes=%i-%i" % self.range
try:
- print "req"
resp = self.getResponse(self.url, self.get, self.post, self.referer, self.cookies, self.customHeaders)
self.resp = resp
except HTTPError, e: