summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-27 20:27:38 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-27 20:27:38 +0200
commit06d6f4ffda1b1542d9345f246f1c9645d96aeec0 (patch)
tree34a414c9170254ae6e886668a440a1a37d228de8 /module/network
parentShareonline, zshare fix, testing __slots__ attribute (diff)
downloadpyload-06d6f4ffda1b1542d9345f246f1c9645d96aeec0.tar.xz
closed #345
Diffstat (limited to 'module/network')
-rw-r--r--module/network/RequestFactory.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/network/RequestFactory.py b/module/network/RequestFactory.py
index 44f66efab..6bb7ced62 100644
--- a/module/network/RequestFactory.py
+++ b/module/network/RequestFactory.py
@@ -61,8 +61,11 @@ class RequestFactory():
def getURL(self, *args, **kwargs):
""" see HTTPRequest for argument list """
h = HTTPRequest(None, self.getOptions())
- rep = h.load(*args, **kwargs)
- h.close()
+ try:
+ rep = h.load(*args, **kwargs)
+ finally:
+ h.close()
+
return rep
def getCookieJar(self, pluginName, account=None):