summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 9241d73..056380f 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -173,8 +173,8 @@ else: #pragma: no cover
"""Return the frame object for the caller's stack frame."""
try:
raise Exception
- except Exception:
- return sys.exc_info()[2].tb_frame.f_back
+ except Exception as exc:
+ return exc.__traceback__.tb_frame.f_back
#
# _srcfile is used when walking the stack to check when we've got the first