Skip to content

Commit

Permalink
MultipartReader doesn't work with -OO #1969
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Jun 18, 2017
1 parent 25dde83 commit 9f69939
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Changes
- Connection can be destroyed before response get processed if
`await aiohttp.request(..)` is used #1981

- MultipartReader doesn't work with -OO #1969


2.1.0 (2017-05-26)
------------------
Expand Down
3 changes: 2 additions & 1 deletion aiohttp/multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ def read_chunk(self, size=chunk_size):
if self._read_bytes == self._length:
self._at_eof = True
if self._at_eof:
assert b'\r\n' == (yield from self._content.readline()), \
clrf = yield from self._content.readline()
assert b'\r\n' == clrf, \
'reader did not read all the data or it is malformed'
return chunk

Expand Down

0 comments on commit 9f69939

Please sign in to comment.