We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e142699 commit 5b6496dCopy full SHA for 5b6496d
1 file changed
trio_asyncio/loop.py
@@ -125,12 +125,12 @@ def _new_run_get():
125
try:
126
task = trio.hazmat.current_task()
127
except RuntimeError:
128
- loop = None
+ loop = _orig_run_get()
129
else:
130
loop = task.context.get(current_loop, None)
131
+ if loop is None:
132
+ raise RuntimeError("No trio_asyncio loop is active.")
133
- if loop is None:
- loop = _orig_run_get()
134
return loop
135
136
0 commit comments