We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 589e6cb commit 843861cCopy full SHA for 843861c
python-ecosys/aiohttp/aiohttp/__init__.py
@@ -42,10 +42,7 @@ def _decode(self, data):
42
return data
43
44
async def read(self, sz=-1):
45
- if sz == -1:
46
- return self._decode(await self.content.read(sz))
47
- else:
48
- return self._decode(await self.content.readexactly(sz))
+ return self._decode(await (self.content.read(sz) if sz == -1 else self.content.readexactly(sz)))
49
50
async def text(self, encoding="utf-8"):
51
return (await self.read(int(self._get_header("content-length", -1)))).decode(encoding)
0 commit comments