mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Remove sys.exc_type, sys.exc_value, sys.exc_traceback
This commit is contained in:
parent
fc85c92a85
commit
ac3625fcb9
16 changed files with 36 additions and 58 deletions
|
@ -105,7 +105,8 @@ class Debugger(bdb.Bdb):
|
|||
raise 'spam'
|
||||
except:
|
||||
pass
|
||||
frame = sys.exc_traceback.tb_frame
|
||||
tb = sys.exc_info()[2]
|
||||
frame = tb.tb_frame
|
||||
while frame is not None:
|
||||
del frame.f_trace
|
||||
frame = frame.f_back
|
||||
|
@ -527,7 +528,7 @@ class Debugger(bdb.Bdb):
|
|||
raise bdb.BdbQuit
|
||||
except:
|
||||
print 'XXX Exception during debugger interaction.', \
|
||||
self.formatexception(sys.exc_type, sys.exc_value)
|
||||
self.formatexception(sys.exc_info[:2])
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return self.trace_dispatch
|
||||
|
@ -855,7 +856,8 @@ def startfromhere():
|
|||
try:
|
||||
raise 'spam'
|
||||
except:
|
||||
frame = sys.exc_traceback.tb_frame.f_back
|
||||
tb = sys.exc_info()[2]
|
||||
frame = tb.tb_frame.f_back
|
||||
d.start(frame)
|
||||
|
||||
def startfrombottom():
|
||||
|
@ -876,7 +878,8 @@ def _getbottomframe():
|
|||
raise 'spam'
|
||||
except:
|
||||
pass
|
||||
frame = sys.exc_traceback.tb_frame
|
||||
tb = sys.exc_info()[2]
|
||||
frame = tb.tb_frame
|
||||
while 1:
|
||||
if frame.f_code.co_name == 'mainloop' or frame.f_back is None:
|
||||
break
|
||||
|
|
|
@ -1212,7 +1212,7 @@ def execstring(pytext, globals, locals, filename="<string>", debugging=0,
|
|||
except:
|
||||
if debugging:
|
||||
sys.settrace(None)
|
||||
PyDebugger.postmortem(sys.exc_type, sys.exc_value, sys.exc_traceback)
|
||||
PyDebugger.postmortem(*sys.exc_info())
|
||||
return
|
||||
else:
|
||||
tracebackwindow.traceback(1, filename)
|
||||
|
@ -1289,7 +1289,6 @@ class _EditorDefaultSettings:
|
|||
settings = FontSettings.FontDialog(self.fontsettings, self.tabsettings)
|
||||
if settings:
|
||||
self.fontsettings, self.tabsettings = settings
|
||||
sys.exc_traceback = None
|
||||
self.w.fonttext.set(self.template % (self.fontsettings[0], self.fontsettings[2]))
|
||||
|
||||
def close(self):
|
||||
|
@ -1327,7 +1326,6 @@ def geteditorprefs():
|
|||
fontsettings = prefs.pyedit.fontsettings = ("Geneva", 0, 10, (0, 0, 0))
|
||||
tabsettings = prefs.pyedit.tabsettings = (8, 1)
|
||||
windowsize = prefs.pyedit.windowsize = (500, 250)
|
||||
sys.exc_traceback = None
|
||||
return fontsettings, tabsettings, windowsize
|
||||
|
||||
def seteditorprefs(fontsettings, tabsettings, windowsize):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue