File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,6 +142,8 @@ def close(self, *args: Any) -> None: # noqa: C901
142142 if exception_found :
143143 try :
144144 dep .throw (* args )
145+ except StopIteration :
146+ continue
145147 except BaseException as exc :
146148 logger .warning (
147149 "Exception found on dependency teardown %s" ,
@@ -243,6 +245,8 @@ async def close(self, *args: Any) -> None: # noqa: C901
243245 if exception_found :
244246 try :
245247 dep .throw (* args )
248+ except StopIteration :
249+ continue
246250 except BaseException as exc :
247251 logger .warning (
248252 "Exception found on dependency teardown %s" ,
@@ -257,6 +261,8 @@ async def close(self, *args: Any) -> None: # noqa: C901
257261 if exception_found :
258262 try :
259263 await dep .athrow (* args )
264+ except StopAsyncIteration :
265+ continue
260266 except BaseException as exc :
261267 logger .warning (
262268 "Exception found on dependency teardown %s" ,
You can’t perform that action at this time.
0 commit comments