Skip to content

Commit 019ed9d

Browse files
Actually fix issue37658
1 parent 07236d5 commit 019ed9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/asyncio/tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ async def wait_for(fut, timeout):
415415

416416
await _cancel_and_wait(fut, loop=loop)
417417
try:
418-
fut.result()
418+
return fut.result()
419419
except exceptions.CancelledError as exc:
420420
raise exceptions.TimeoutError() from exc
421421
else:
@@ -455,7 +455,7 @@ async def wait_for(fut, timeout):
455455
# exception, we should re-raise it
456456
# See https://bugs.python.org/issue40607
457457
try:
458-
fut.result()
458+
return fut.result()
459459
except exceptions.CancelledError as exc:
460460
raise exceptions.TimeoutError() from exc
461461
else:

0 commit comments

Comments
 (0)