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