summaryrefslogtreecommitdiff
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-04-26 02:29:55 +0000
committerFred Drake <fdrake@acm.org>2002-04-26 02:29:55 +0000
commit91fa326b1f69fd09439a35c8e19f41ce452374f5 (patch)
treec2fa096070d8ea6157f7b0a65dd19be84d459761 /Lib/inspect.py
parentece22477ee055e30c08e2230c57a8a250599df7d (diff)
downloadcpython-91fa326b1f69fd09439a35c8e19f41ce452374f5.tar.gz
Clean up uses of some deprecated features.
Reported by Neal Norwitz on python-dev.
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 2b28d8ebe3..38b93bf80c 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -769,7 +769,7 @@ def currentframe():
try:
1/0
except ZeroDivisionError:
- return sys.exc_traceback.tb_frame.f_back
+ return sys.exc_info()[2].tb_frame.f_back
if hasattr(sys, '_getframe'): currentframe = sys._getframe
@@ -779,4 +779,4 @@ def stack(context=1):
def trace(context=1):
"""Return a list of records for the stack below the current exception."""
- return getinnerframes(sys.exc_traceback, context)
+ return getinnerframes(sys.exc_info()[2], context)