diff options
author | mkaay <mkaay@mkaay.de> | 2010-12-25 00:24:24 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-12-25 00:24:24 +0100 |
commit | 9b9b7d4fd75f88492ab407cc2ccbdc7df3054323 (patch) | |
tree | 538472b1970d75ddd97a5b9a4b76faa2ba91bc58 /module/network/Browser.py | |
parent | fixed reusing bad connection (diff) | |
download | pyload-9b9b7d4fd75f88492ab407cc2ccbdc7df3054323.tar.xz |
fixed weird issues, comments
Diffstat (limited to 'module/network/Browser.py')
-rw-r--r-- | module/network/Browser.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/network/Browser.py b/module/network/Browser.py index 28edf8e9d..512a437ed 100644 --- a/module/network/Browser.py +++ b/module/network/Browser.py @@ -82,8 +82,8 @@ class Browser(object): pass return location - def _removeConnection(self, d): - i = self.downloadConnections.index(d) + def _removeConnection(self, *args, **kwargs): + i = self.downloadConnections.index(args[-1]) del self.downloadConnections[i] def abortDownloads(self): @@ -110,6 +110,7 @@ class Browser(object): d = dwnld.download(chunks=chunks, resume=resume) self.downloadConnections.append(d) d.addCallback(self._removeConnection, d) + d.addErrback(self._removeConnection, d) return d def ftpDownload(self, url, filename, resume=False): |