diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-12-18 00:20:10 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-12-18 00:20:10 (GMT) |
commit | 3a1c738e6cf09d0972809fa431bf77dd564ff713 (patch) | |
tree | 85835dd31020158df43ad2830ecabf345b25a27c /Lib/asyncio/base_events.py | |
parent | 2338156fa4f8d6c04601f9972c36a7b06bd685bc (diff) | |
download | cpython-3a1c738e6cf09d0972809fa431bf77dd564ff713.zip cpython-3a1c738e6cf09d0972809fa431bf77dd564ff713.tar.gz cpython-3a1c738e6cf09d0972809fa431bf77dd564ff713.tar.bz2 |
Issue #23074: asyncio.get_event_loop() now raises an exception if the thread
has no event loop even if assertions are disabled.
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r-- | Lib/asyncio/base_events.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 0c7316e..b1a5422 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -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( |