aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-03-25 21:37:54 +0000
committerSkip Montanaro <skip@pobox.com>2002-03-25 21:37:54 +0000
commita959a36288120863f2122ac1c226ee965efcec97 (patch)
treeaf6181152a6d67553914867213e5df648dbaa377 /Lib/inspect.py
parentMissed change METH_OLDARGS to METH_NOARGS for two aliased functions (diff)
downloadcpython-a959a36288120863f2122ac1c226ee965efcec97.tar.gz
cpython-a959a36288120863f2122ac1c226ee965efcec97.tar.bz2
cpython-a959a36288120863f2122ac1c226ee965efcec97.zip
tighten up unqualified except in currentframe()
see bug 411881
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 e4f6b575e0f..175f5d6eb17 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -762,8 +762,8 @@ def getinnerframes(tb, context=1):
def currentframe():
"""Return the frame object for the caller's stack frame."""
try:
- raise 'catch me'
- except:
+ 1/0
+ except ZeroDivisionError:
return sys.exc_traceback.tb_frame.f_back
if hasattr(sys, '_getframe'): currentframe = sys._getframe