cubicweb/server/sources/datafeed.py
changeset 11129 97095348b3ee
parent 11055 3c1139344621
parent 11125 e717da3dc164
child 11138 78c8e64f3cef
equal deleted inserted replaced
11128:9b4de34ad394 11129:97095348b3ee
   354             cnx = cwproxy_for(url)
   354             cnx = cwproxy_for(url)
   355             cnx.timeout = self.source.http_timeout
   355             cnx.timeout = self.source.http_timeout
   356             self.source.info('Using cwclientlib for %s' % url)
   356             self.source.info('Using cwclientlib for %s' % url)
   357             resp = cnx.get(url)
   357             resp = cnx.get(url)
   358             resp.raise_for_status()
   358             resp.raise_for_status()
   359             return URLLibResponseAdapter(BytesIO(resp.text), url)
   359             return URLLibResponseAdapter(BytesIO(resp.content), url)
   360         except (ImportError, ValueError, EnvironmentError) as exc:
   360         except (ImportError, ValueError, EnvironmentError) as exc:
   361             # ImportError: not available
   361             # ImportError: not available
   362             # ValueError: no config entry found
   362             # ValueError: no config entry found
   363             # EnvironmentError: no cwclientlib config file found
   363             # EnvironmentError: no cwclientlib config file found
   364             self.source.debug(str(exc))
   364             self.source.debug(str(exc))