From 7ba3b4b20796f8cab3bde215e998014aa18b53ab Mon Sep 17 00:00:00 2001 From: warik Date: Tue, 15 Jul 2014 18:36:30 +0300 Subject: [PATCH] Fixed parameter type for IncompleteRead exception --- aiohttp/protocol.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aiohttp/protocol.py b/aiohttp/protocol.py index 6299065aa0e..b5fac701764 100644 --- a/aiohttp/protocol.py +++ b/aiohttp/protocol.py @@ -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 @@ -373,7 +373,7 @@ 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) @@ -381,7 +381,7 @@ def feed_data(self, 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()