summaryrefslogtreecommitdiffstats
path: root/module/network/helper.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-12-21 18:20:30 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-12-21 18:20:30 +0100
commit7fa32641f04e93681d21f04022af673aa2c8c31a (patch)
tree4df57c1c8280a3bcebb619ce4bc04a10cbef1741 /module/network/helper.py
parentimproved bucket (diff)
downloadpyload-7fa32641f04e93681d21f04022af673aa2c8c31a.tar.xz
new download backend: wrapped deferred, Request compatibility draft, other fixes
added caution's fixes (VeehdCom, PornhubCom)
Diffstat (limited to 'module/network/helper.py')
-rw-r--r--module/network/helper.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/module/network/helper.py b/module/network/helper.py
index 6900467f5..8cc61d3ff 100644
--- a/module/network/helper.py
+++ b/module/network/helper.py
@@ -110,3 +110,16 @@ class DeferredGroup(Deferred):
if len(self.group) == self.done:
self.callback()
+class WrappedDeferred():
+ def __init__(self, download, d):
+ self.download = download
+ self.d = d
+
+ def addCallback(self, *args, **kwargs):
+ self.d.addCallback(*args, **kwargs)
+
+ def addErrback(self, *args, **kwargs):
+ self.d.addErrback(*args, **kwargs)
+
+ def __getattr__(self, attr):
+ return getattr(self.download, attr)