diff options
author | Fred Drake <fdrake@acm.org> | 2002-04-26 02:29:55 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-04-26 02:29:55 (GMT) |
commit | d451ec1cdb7bd01786c492a485f3813502640daf (patch) | |
tree | 3906ea8d66868ce34c8fdaf6d706af75d218cf2c /Lib/inspect.py | |
parent | 89e3ee0ccff975f30b81b40dec1ee1d7e6b09f9c (diff) | |
download | cpython-d451ec1cdb7bd01786c492a485f3813502640daf.zip cpython-d451ec1cdb7bd01786c492a485f3813502640daf.tar.gz cpython-d451ec1cdb7bd01786c492a485f3813502640daf.tar.bz2 |
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.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 2b28d8e..38b93bf 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) |