diff options
Diffstat (limited to 'module/network/RequestFactory.py')
-rw-r--r-- | module/network/RequestFactory.py | 7 |
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): |