[datafeed] fix crash due to bad http_timeout handling. Closes #3096585 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 28 Aug 2013 11:56:07 +0200
branchstable
changeset 9224 5c6d6a9f4fc8
parent 9223 233e770293a9
child 9225 4b81252fccdd
[datafeed] fix crash due to bad http_timeout handling. Closes #3096585
server/sources/datafeed.py
--- a/server/sources/datafeed.py	Wed Aug 28 11:36:44 2013 +0200
+++ b/server/sources/datafeed.py	Wed Aug 28 11:56:07 2013 +0200
@@ -445,7 +445,7 @@
         if url.startswith('http'):
             url = self.normalize_url(url)
             self.source.info('GET %s', url)
-            stream = _OPENER.open(url, timeout=self.http_timeout)
+            stream = _OPENER.open(url, timeout=self.source.http_timeout)
         elif url.startswith('file://'):
             stream = open(url[7:])
         else:
@@ -462,7 +462,7 @@
         if extid.startswith('http'):
             try:
                 _OPENER.open(self.normalize_url(extid), # XXX HTTP HEAD request
-                             timeout=self.http_timeout)
+                             timeout=self.source.http_timeout)
             except urllib2.HTTPError as ex:
                 if ex.code == 404:
                     return True