diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-29 21:21:30 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-29 21:21:30 +0100 |
commit | 1541e8b09a7a596b4c3f1e1381bc7911ac582573 (patch) | |
tree | 74b958e8bf85fd5a58d53b4c14509b1b9f52d45f | |
parent | better cleanup (diff) | |
download | pyload-1541e8b09a7a596b4c3f1e1381bc7911ac582573.tar.xz |
hotfile fix
-rw-r--r-- | module/PyFile.py | 2 | ||||
-rw-r--r-- | module/network/Browser.py | 2 | ||||
-rw-r--r-- | module/network/HTTPDownload.py | 2 | ||||
-rw-r--r-- | module/plugins/Account.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/HotfileCom.py | 2 |
5 files changed, 8 insertions, 4 deletions
diff --git a/module/PyFile.py b/module/PyFile.py index 45add5a47..dc6a09025 100644 --- a/module/PyFile.py +++ b/module/PyFile.py @@ -120,7 +120,7 @@ class PyFile(): """sync and remove from cache""" self.sync() - if hasattr(self, "plugin"): + if hasattr(self, "plugin") and self.plugin: self.plugin.clean() del self.plugin diff --git a/module/network/Browser.py b/module/network/Browser.py index 3a8cd94a0..994a1bcc7 100644 --- a/module/network/Browser.py +++ b/module/network/Browser.py @@ -77,7 +77,7 @@ class Browser(object): self.dl.download(chunks, resume) self._size = self.dl.size - self.dl.clean() + self.dl.close() self.dl = None diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py index c1ca77e2c..3bd9a1184 100644 --- a/module/network/HTTPDownload.py +++ b/module/network/HTTPDownload.py @@ -214,7 +214,7 @@ class HTTPDownload(): self._copyChunks() - def clean(self): + def close(self): """ cleanup """ for chunk in self.chunks: chunk.close() diff --git a/module/plugins/Account.py b/module/plugins/Account.py index 29c5f93b8..5fa7140f5 100644 --- a/module/plugins/Account.py +++ b/module/plugins/Account.py @@ -56,6 +56,8 @@ class Account(): data["valid"] = False if self.core.debug: print_exc() + finally: + if req: req.close() def setAccounts(self, accounts): self.accounts = accounts @@ -95,6 +97,8 @@ class Account(): except Exception, e: infos = {"error": str(e)} + if req: req.close() + self.core.log.debug("Account Info: %s" % str(infos)) self.infos[name] = infos diff --git a/module/plugins/accounts/HotfileCom.py b/module/plugins/accounts/HotfileCom.py index 42b8274b1..9b54e6a3c 100644 --- a/module/plugins/accounts/HotfileCom.py +++ b/module/plugins/accounts/HotfileCom.py @@ -69,7 +69,7 @@ class HotfileCom(Account): post.update({"action": method}) post.update({"username":user, "passwordmd5dig":pwhash, "digest":digest}) resp = req.load("http://api.hotfile.com/", post=post) - req.clean() + req.close() return resp def login(self, user, data, req): |