From: Guido van Rossum Date: Fri, 27 Mar 1992 15:09:46 +0000 (+0000) Subject: use settrace() intreface X-Git-Tag: v0.9.8~463 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=edbfcbd7ef4016b4b3c24af3ff652998a35717a3;p=thirdparty%2FPython%2Fcpython.git use settrace() intreface --- diff --git a/Lib/bdb.py b/Lib/bdb.py index dfc41d910500..a5b580b3f386 100644 --- a/Lib/bdb.py +++ b/Lib/bdb.py @@ -145,8 +145,7 @@ class Bdb: # Basic Debugger self.stopframe = self.botframe self.returnframe = None self.quitting = 1 - sys.trace = None - del sys.trace + sys.settrace(None) # Derived classes and clients can call the following functions # to manipulate breakpoints. These functions return an @@ -245,15 +244,14 @@ class Bdb: # Basic Debugger def runctx(self, cmd, globals, locals): self.reset() - sys.trace = self.trace_dispatch + sys.settrace(self.trace_dispatch) try: exec(cmd + '\n', globals, locals) except BdbQuit: pass finally: self.quitting = 1 - sys.trace = None - del sys.trace + sys.settrace(None) # XXX What to do if the command finishes normally?