[datafeed] io.BytesIO requires a buffer, not a unicode (closes #9783743)
authorDavid Douard <david.douard@logilab.fr>
Wed, 06 Jan 2016 08:58:43 +0100
changeset 11055 3c1139344621
parent 11052 058bb3dc685f
child 11056 b7f8d2ee6532
[datafeed] io.BytesIO requires a buffer, not a unicode (closes #9783743) The URLLibResponseAdapter should probably be refactored (or killed?)
server/sources/datafeed.py
--- a/server/sources/datafeed.py	Mon Jan 04 18:40:30 2016 +0100
+++ b/server/sources/datafeed.py	Wed Jan 06 08:58:43 2016 +0100
@@ -352,7 +352,7 @@
             self.source.info('Using cwclientlib for %s' % url)
             resp = cnx.get(url)
             resp.raise_for_status()
-            return URLLibResponseAdapter(BytesIO(resp.text), url)
+            return URLLibResponseAdapter(BytesIO(resp.content), url)
         except (ImportError, ValueError, EnvironmentError) as exc:
             # ImportError: not available
             # ValueError: no config entry found