diff options
| author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-04-06 10:08:25 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-06 10:08:25 (GMT) |
| commit | 482b6eeadcde3e6573f0d243e687de7be7680379 (patch) | |
| tree | 293a6be3605658c75e0b398268180142af46d1da /Lib/test/test_logging.py | |
| parent | a44568b80dfc494759d45db59423ed314bc70f9e (diff) | |
| download | cpython-482b6eeadcde3e6573f0d243e687de7be7680379.zip cpython-482b6eeadcde3e6573f0d243e687de7be7680379.tar.gz cpython-482b6eeadcde3e6573f0d243e687de7be7680379.tar.bz2 | |
gh-102799: use sys.exception() instead of sys.exc_info() in tests (#103293)
Diffstat (limited to 'Lib/test/test_logging.py')
| -rw-r--r-- | Lib/test/test_logging.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 072056d..c6de34e 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -5097,8 +5097,7 @@ class BasicConfigTest(unittest.TestCase): message = [] def dummy_handle_error(record): - _, v, _ = sys.exc_info() - message.append(str(v)) + message.append(str(sys.exception())) handler.handleError = dummy_handle_error logging.debug('The Øresund Bridge joins Copenhagen to Malmö') |
