diff options
Diffstat (limited to 'module/network/RequestFactory.py')
-rw-r--r-- | module/network/RequestFactory.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/module/network/RequestFactory.py b/module/network/RequestFactory.py index 5b1528281..aa8977c4d 100644 --- a/module/network/RequestFactory.py +++ b/module/network/RequestFactory.py @@ -40,16 +40,17 @@ class RequestFactory(): def getRequest(self, pluginName, account=None, type="HTTP"): self.lock.acquire() + req = None if type == "XDCC": - return XDCCRequest(proxies=self.getProxies()) - - req = Browser(self.bucket, self.getOptions()) - - if account: - cj = self.getCookieJar(pluginName, account) - req.setCookieJar(cj) + req = XDCCRequest(proxies=self.getProxies()) else: - req.setCookieJar(CookieJar(pluginName)) + req = Browser(self.bucket, self.getOptions()) + + if account: + cj = self.getCookieJar(pluginName, account) + req.setCookieJar(cj) + else: + req.setCookieJar(CookieJar(pluginName)) self.lock.release() return req |