diff options
Diffstat (limited to 'module/network/helper.py')
-rw-r--r-- | module/network/helper.py | 13 |
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) |