From b3cc11a08e1e9121ddba3b9afb9fae032e86f449 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Sat, 18 Mar 2023 07:19:38 +0000 Subject: gh-102799: remove unnecessary calls to sys.exc_info() in tests (#102800) --- Lib/test/test_asyncio/test_unix_events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_asyncio') diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py index 33d0ea15c6d..96999470a7c 100644 --- a/Lib/test/test_asyncio/test_unix_events.py +++ b/Lib/test/test_asyncio/test_unix_events.py @@ -1889,8 +1889,8 @@ class TestFork(unittest.IsolatedAsyncioTestCase): os.write(w, b'LOOP:' + str(id(loop)).encode()) except RuntimeError: os.write(w, b'NO LOOP') - except: - os.write(w, b'ERROR:' + ascii(sys.exc_info()).encode()) + except BaseException as e: + os.write(w, b'ERROR:' + ascii(e).encode()) finally: os._exit(0) else: -- cgit v1.2.3