summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-18 10:58:55 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-18 10:58:55 +0200
commitd25e9ac4e9f698ecfaa02e1a915a66af8da861a1 (patch)
tree3772caae83fce40acd32b7a3355b0d41d0711aa5 /module/network
parentclosed #629 (diff)
downloadpyload-d25e9ac4e9f698ecfaa02e1a915a66af8da861a1.tar.xz
Backed out changeset e7db858d5ab2
Diffstat (limited to 'module/network')
-rw-r--r--module/network/RequestFactory.py17
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