diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-17 14:03:52 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-17 14:03:52 +0200 |
commit | 705d0e5163876c94b9b90a440eb38b152bcba1e0 (patch) | |
tree | c48a726a761e8ffd8e88b62ac5eae598984d985a /module/RequestFactory.py | |
parent | hotfile (diff) | |
download | pyload-705d0e5163876c94b9b90a440eb38b152bcba1e0.tar.xz |
rs fix, more cleanup stuff
Diffstat (limited to 'module/RequestFactory.py')
-rw-r--r-- | module/RequestFactory.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/module/RequestFactory.py b/module/RequestFactory.py index 260a4a1d5..9f93836f4 100644 --- a/module/RequestFactory.py +++ b/module/RequestFactory.py @@ -27,7 +27,7 @@ class RequestFactory(): def __init__(self, core): self.lock = Lock() self.core = core - self.requests = [] + self.requests = [] #seems useless self.cookiejars = [] self.iface = self.core.config["general"]["download_interface"] @@ -47,10 +47,10 @@ class RequestFactory(): elif type == "FTP": req = FtpRequest() - self.requests.append((pluginName, account, req)) + #self.requests.append((pluginName, account, req)) self.lock.release() return req - + def clean(self): self.lock.acquire() for req in self.requests: @@ -70,6 +70,12 @@ class CookieJar(): self.cookies = {} self.plugin = plugin self.account = account + + def __del__(self): + if hasattr(self, "cookies"): + del self.cookies + if hasattr(self, "plugin"): + del self.plugin def addCookies(self, clist): for c in clist: |