Skip to content

Commit c29b492

Browse files
fix: name error CancelledError
1 parent c9718ae commit c29b492

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

async_lru/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ async def __call__(self, /, *fn_args: Any, **fn_kwargs: Any) -> _R:
209209
cache_item.waiters += 1
210210
try:
211211
return await asyncio.shield(cache_item.fut)
212-
except CancelledError:
212+
except asyncio.CancelledError:
213213
_handle_cancelled_error(cache_item, task)
214214
raise
215215
finally:
@@ -234,7 +234,7 @@ async def __call__(self, /, *fn_args: Any, **fn_kwargs: Any) -> _R:
234234

235235
try:
236236
return await asyncio.shield(fut)
237-
except CancelledError:
237+
except asyncio.CancelledError:
238238
_handle_cancelled_error(cache_item, task)
239239
raise
240240
finally:

0 commit comments

Comments
 (0)