Skip to content

Commit 54d0118

Browse files
Remove redundant else condition.
1 parent 722fe3a commit 54d0118

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Lib/asyncio/tasks.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,6 @@ async def wait_for(fut, timeout):
418418
return fut.result()
419419
except exceptions.CancelledError as exc:
420420
raise exceptions.TimeoutError() from exc
421-
else:
422-
raise exceptions.TimeoutError()
423421

424422
waiter = loop.create_future()
425423
timeout_handle = loop.call_later(timeout, _release_waiter, waiter)
@@ -458,8 +456,6 @@ async def wait_for(fut, timeout):
458456
return fut.result()
459457
except exceptions.CancelledError as exc:
460458
raise exceptions.TimeoutError() from exc
461-
else:
462-
raise exceptions.TimeoutError()
463459
finally:
464460
timeout_handle.cancel()
465461

0 commit comments

Comments
 (0)