Skip to content

Commit 1504187

Browse files
authored
Update src/trio/_core/_asyncgens.py
1 parent 0ec9f8a commit 1504187

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/trio/_core/_asyncgens.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ def finalizer(agen: AsyncGeneratorType[object, NoReturn]) -> None:
8383
agen_name = name_asyncgen(agen)
8484
try:
8585
self.foreign.remove(id(agen))
86-
is_ours = False
8786
except KeyError:
8887
is_ours = True
88+
else:
89+
is_ours = False
8990

9091
if is_ours:
9192
runner.entry_queue.run_sync_soon(

0 commit comments

Comments
 (0)