Skip to content

Commit 1d1b0e9

Browse files
committed
test fixes
1 parent 1d27348 commit 1d1b0e9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Lib/asyncio/tools.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ def _cor_node(parent_key, frame_name):
6464

6565

6666
def _roots(id2label, children):
67-
# roots = [n for n, lbl in id2label.items() if lbl == "Task-1"]
68-
# if roots:
69-
# return roots
7067
all_children = {c for kids in children.values() for c in kids}
7168
return [n for n in id2label if n not in all_children]
7269

@@ -183,8 +180,8 @@ def _print_cycle_exception(exception: CycleFoundException):
183180
try:
184181
tasks = get_all_awaited_by(args.pid)
185182
except RuntimeError as e:
186-
while e.__cause__ is not None:
187-
e = e.__cause__
183+
while e.__context__ is not None:
184+
e = e.__context__
188185
print(f"Error retrieving tasks: {e}")
189186
sys.exit(1)
190187

0 commit comments

Comments
 (0)