diff options
author | Guido van Rossum <guido@python.org> | 1992-03-27 15:09:46 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-27 15:09:46 +0000 |
commit | 654948e29e07c3f09a332d4190a1de03c43c09f3 (patch) | |
tree | 587284baccccedd25bad905a3ef79c94f99557c5 /Lib/bdb.py | |
parent | 7416ff31edb66d224cb921ede43de575094294e3 (diff) | |
download | cpython-654948e29e07c3f09a332d4190a1de03c43c09f3.tar.gz |
use settrace() intreface
Diffstat (limited to 'Lib/bdb.py')
-rw-r--r-- | Lib/bdb.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/bdb.py b/Lib/bdb.py index dfc41d9105..a5b580b3f3 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? |