Skip to content

Commit

Permalink
Merge pull request #118 from warik/incomplete_read_fix
Browse files Browse the repository at this point in the history
Fixed parameter type for IncompleteRead exception
  • Loading branch information
fafhrd91 committed Jul 15, 2014
2 parents 29a52c3 + 7ba3b4b commit 92c0a39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aiohttp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def parse_chunked_payload(self, out, buf):
try:
size = int(line, 16)
except ValueError:
raise errors.IncompleteRead(b'') from None
raise errors.IncompleteRead(0) from None

if size == 0: # eof marker
break
Expand Down Expand Up @@ -373,15 +373,15 @@ def feed_data(self, chunk):
try:
chunk = self.zlib.decompress(chunk)
except Exception:
raise errors.IncompleteRead(b'') from None
raise errors.IncompleteRead(0) from None

if chunk:
self.out.feed_data(chunk)

def feed_eof(self):
self.out.feed_data(self.zlib.flush())
if not self.zlib.eof:
raise errors.IncompleteRead(b'')
raise errors.IncompleteRead(0)

self.out.feed_eof()

Expand Down

0 comments on commit 92c0a39

Please sign in to comment.