Skip to content

Commit

Permalink
restore client_reqrep body logic
Browse files Browse the repository at this point in the history
  • Loading branch information
derlih committed Jan 19, 2021
1 parent 7a8b193 commit 68905c1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions aiohttp/client_reqrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,10 @@ async def write_bytes(
await self.body.write(writer)
else:
if isinstance(self.body, (bytes, bytearray)):
body = (self.body,)
else:
body = self.body
self.body = (self.body,) # type: ignore[assignment]

for chunk in body:
await writer.write(chunk)
for chunk in self.body:
await writer.write(chunk) # type: ignore[arg-type]

await writer.write_eof()
except OSError as exc:
Expand Down

0 comments on commit 68905c1

Please sign in to comment.