From 22a3f78767aaef44fc4e61a0479b42be3279eac5 Mon Sep 17 00:00:00 2001 From: Jeix Date: Mon, 17 Sep 2012 21:58:37 +0200 Subject: closed #629 --- module/network/RequestFactory.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'module/network/RequestFactory.py') 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 -- cgit v1.2.3