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 722fe3a commit 54d0118Copy full SHA for 54d0118
Lib/asyncio/tasks.py
@@ -418,8 +418,6 @@ async def wait_for(fut, timeout):
418
return fut.result()
419
except exceptions.CancelledError as exc:
420
raise exceptions.TimeoutError() from exc
421
- else:
422
- raise exceptions.TimeoutError()
423
424
waiter = loop.create_future()
425
timeout_handle = loop.call_later(timeout, _release_waiter, waiter)
@@ -458,8 +456,6 @@ async def wait_for(fut, timeout):
458
456
459
457
460
461
462
463
finally:
464
timeout_handle.cancel()
465
0 commit comments