summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Firshman <ben@firshman.co.uk>2014-01-28 13:32:24 +0000
committerBen Firshman <ben@firshman.co.uk>2014-01-28 15:01:39 +0000
commitb97e6ea0436c3ab59d2a912627e77636a2b65a6f (patch)
treea19eac7b3e8d85c2832fb1c060e0b30f9e121c74
parent99ce1f7263e1fde9ea9fe6c9c9267e02451de3ae (diff)
downloaddocker-py-b97e6ea0436c3ab59d2a912627e77636a2b65a6f.tar.gz
Fix _stream_result concatenating bytes with str
Without this option, requests returns lines as bytes on Python 3 which can't be concatenated with the str '\n' in the yield.
-rw-r--r--docker/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/client.py b/docker/client.py
index 7347e31..c81aa9e 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -225,7 +225,7 @@ class Client(requests.Session):
def _stream_result(self, response):
"""Generator for straight-out, non chunked-encoded HTTP responses."""
self._raise_for_status(response)
- for line in response.iter_lines(chunk_size=1):
+ for line in response.iter_lines(chunk_size=1, decode_unicode=True):
# filter out keep-alive new lines
if line:
yield line + '\n'