update
This commit is contained in:
6
.CondaPkg/env/Lib/asyncio/taskgroups.py
vendored
6
.CondaPkg/env/Lib/asyncio/taskgroups.py
vendored
@@ -54,16 +54,14 @@ class TaskGroup:
|
||||
async def __aenter__(self):
|
||||
if self._entered:
|
||||
raise RuntimeError(
|
||||
f"TaskGroup {self!r} has been already entered")
|
||||
self._entered = True
|
||||
|
||||
f"TaskGroup {self!r} has already been entered")
|
||||
if self._loop is None:
|
||||
self._loop = events.get_running_loop()
|
||||
|
||||
self._parent_task = tasks.current_task(self._loop)
|
||||
if self._parent_task is None:
|
||||
raise RuntimeError(
|
||||
f'TaskGroup {self!r} cannot determine the parent task')
|
||||
self._entered = True
|
||||
|
||||
return self
|
||||
|
||||
|
||||
Reference in New Issue
Block a user