Skip to content

Commit 83953ab

Browse files
committed
Remove dead try/except in asyncio.Lock._wake_up_first
1 parent 3d2aa89 commit 83953ab

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Lib/asyncio/locks.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,7 @@ def _wake_up_first(self):
145145
"""Ensure that the first waiter will wake up."""
146146
if not self._waiters:
147147
return
148-
try:
149-
fut = next(iter(self._waiters))
150-
except StopIteration:
151-
return
148+
fut = next(iter(self._waiters))
152149

153150
# .done() means that the waiter is already set to wake up.
154151
if not fut.done():

0 commit comments

Comments
 (0)