mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (GH-22654)
This commit is contained in:
parent
47e1afd2a1
commit
8374d2ee15
3 changed files with 30 additions and 2 deletions
|
@ -102,9 +102,9 @@ class IsolatedAsyncioTestCase(TestCase):
|
|||
ret = await awaitable
|
||||
if not fut.cancelled():
|
||||
fut.set_result(ret)
|
||||
except asyncio.CancelledError:
|
||||
except (SystemExit, KeyboardInterrupt):
|
||||
raise
|
||||
except Exception as ex:
|
||||
except (BaseException, asyncio.CancelledError) as ex:
|
||||
if not fut.cancelled():
|
||||
fut.set_exception(ex)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue