Skip to content

Commit 5144ac7

Browse files
committed
inspect.isgenerator -> asyncio.iscoroutine
1 parent 8d12225 commit 5144ac7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aiohttp/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def update_body_from_data(self, data):
377377
elif isinstance(data, (asyncio.StreamReader, streams.DataQueue)):
378378
self.body = data
379379

380-
elif inspect.isgenerator(data):
380+
elif asyncio.iscoroutine(data):
381381
self.body = data
382382
if 'CONTENT-LENGTH' not in self.headers and self.chunked is None:
383383
self.chunked = True
@@ -447,7 +447,7 @@ def write_bytes(self, request, reader):
447447
yield from self._continue
448448

449449
try:
450-
if inspect.isgenerator(self.body):
450+
if asyncio.iscoroutine(self.body):
451451
exc = None
452452
value = None
453453
stream = self.body

0 commit comments

Comments
 (0)