Skip to content

Commit 9170219

Browse files
committed
Python 3 sees empty lines as \n instead of \r\n (wat). Fixes #257
1 parent f06c295 commit 9170219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def _stream_helper(self, response):
227227
# Because Docker introduced newlines at the end of chunks in v0.9,
228228
# and only on some API endpoints, we have to cater for both cases.
229229
size_line = socket.readline()
230-
if size_line == '\r\n':
230+
if size_line == '\r\n' or size_line == '\n':
231231
size_line = socket.readline()
232232

233233
size = int(size_line, 16)

0 commit comments

Comments
 (0)