Commit a959a362 authored by Skip Montanaro's avatar Skip Montanaro

tighten up unqualified except in currentframe()

see bug 411881
parent 23584251
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment