Issue #23074: asyncio.get_event_loop() now raises an exception if the thread

has no event loop even if assertions are disabled.
This commit is contained in:
Victor Stinner 2014-12-18 01:20:10 +01:00
parent 2338156fa4
commit 3a1c738e6c
3 changed files with 6 additions and 6 deletions

View file

@ -420,7 +420,7 @@ class BaseEventLoop(events.AbstractEventLoop):
"""
try:
current = events.get_event_loop()
except AssertionError:
except RuntimeError:
return
if current is not self:
raise RuntimeError(