diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 05:49:33 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 05:49:33 (GMT) |
commit | ac3625fcb95c2c54e40e1a27f2395811adbed03e (patch) | |
tree | 7ef987a510e3ad2e43ee67ca6854cd6af23673f9 /Mac | |
parent | fc85c92a85e08d39ea769a07a3dc2a3c83c21477 (diff) | |
download | cpython-ac3625fcb95c2c54e40e1a27f2395811adbed03e.zip cpython-ac3625fcb95c2c54e40e1a27f2395811adbed03e.tar.gz cpython-ac3625fcb95c2c54e40e1a27f2395811adbed03e.tar.bz2 |
Remove sys.exc_type, sys.exc_value, sys.exc_traceback
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Tools/IDE/PyDebugger.py | 11 | ||||
-rw-r--r-- | Mac/Tools/IDE/PyEdit.py | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/Mac/Tools/IDE/PyDebugger.py b/Mac/Tools/IDE/PyDebugger.py index 5ee92d5..7fbc0f0 100644 --- a/Mac/Tools/IDE/PyDebugger.py +++ b/Mac/Tools/IDE/PyDebugger.py @@ -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 diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py index 88c72ac..56f3f8d 100644 --- a/Mac/Tools/IDE/PyEdit.py +++ b/Mac/Tools/IDE/PyEdit.py @@ -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): |