From: Federico Caselli Date: Mon, 15 May 2023 18:50:21 +0000 (+0200) Subject: Avoid unnecessary nested exceptions X-Git-Tag: rel_2_0_14~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13fb60bfa6f6c7e07e00892365e7af493474e224;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Avoid unnecessary nested exceptions Change-Id: Ibca9dc93f541992105cd915e02a3d3e9a0dbd67e --- diff --git a/lib/sqlalchemy/util/_concurrency_py3k.py b/lib/sqlalchemy/util/_concurrency_py3k.py index 0e26425b25..8d48aeacf2 100644 --- a/lib/sqlalchemy/util/_concurrency_py3k.py +++ b/lib/sqlalchemy/util/_concurrency_py3k.py @@ -258,4 +258,6 @@ def get_event_loop() -> asyncio.AbstractEventLoop: try: return asyncio.get_running_loop() except RuntimeError: - return asyncio.get_event_loop_policy().get_event_loop() + # avoid "During handling of the above exception, another exception..." + pass + return asyncio.get_event_loop_policy().get_event_loop()