tighten up unqualified except in currentframe()

see bug 411881
This commit is contained in:
Skip Montanaro 2002-03-25 21:37:54 +00:00
parent 2358425146
commit a959a36288
1 changed files with 2 additions and 2 deletions

View File

@ -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