summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-04-06 10:08:25 (GMT)
committerGitHub <noreply@github.com>2023-04-06 10:08:25 (GMT)
commit482b6eeadcde3e6573f0d243e687de7be7680379 (patch)
tree293a6be3605658c75e0b398268180142af46d1da /Lib/test/test_logging.py
parenta44568b80dfc494759d45db59423ed314bc70f9e (diff)
downloadcpython-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.py3
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ö')