Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 27060c0

Browse files
committed
Minor fixes.
1 parent b53e678 commit 27060c0

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

Lib/lib-stdwin/wdb.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# wdb.py -- a window-based Python debugger
22

3+
# XXX To do:
4+
# - don't fall out of bottom frame
5+
# - is the /tmp file hack really needed?
6+
# - also use it for post-mortem debugging
7+
8+
39
import stdwin
410
from stdwinevents import *
511
import sys
@@ -65,15 +71,18 @@ def user_return(self, frame, return_value):
6571
frame.f_locals['__return__'] = return_value
6672
self.settitle('--Return--')
6773
self.interaction(frame, None)
68-
self.settitle('--Stack--')
74+
if not self.closed:
75+
self.settitle('--Stack--')
6976

7077
def user_exception(self, frame, (exc_type, exc_value, exc_traceback)):
7178
# This function is called if an exception occurs,
7279
# but only if we are to stop at or just below this level
7380
frame.f_locals['__exception__'] = exc_type, exc_value
7481
self.settitle(exc_type + ': ' + repr.repr(exc_value))
82+
stdwin.fleep()
7583
self.interaction(frame, exc_traceback)
76-
self.settitle('--Stack--')
84+
if not self.closed:
85+
self.settitle('--Stack--')
7786

7887
# Change the title
7988

Lib/stdwin/wdb.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# wdb.py -- a window-based Python debugger
22

3+
# XXX To do:
4+
# - don't fall out of bottom frame
5+
# - is the /tmp file hack really needed?
6+
# - also use it for post-mortem debugging
7+
8+
39
import stdwin
410
from stdwinevents import *
511
import sys
@@ -65,15 +71,18 @@ def user_return(self, frame, return_value):
6571
frame.f_locals['__return__'] = return_value
6672
self.settitle('--Return--')
6773
self.interaction(frame, None)
68-
self.settitle('--Stack--')
74+
if not self.closed:
75+
self.settitle('--Stack--')
6976

7077
def user_exception(self, frame, (exc_type, exc_value, exc_traceback)):
7178
# This function is called if an exception occurs,
7279
# but only if we are to stop at or just below this level
7380
frame.f_locals['__exception__'] = exc_type, exc_value
7481
self.settitle(exc_type + ': ' + repr.repr(exc_value))
82+
stdwin.fleep()
7583
self.interaction(frame, exc_traceback)
76-
self.settitle('--Stack--')
84+
if not self.closed:
85+
self.settitle('--Stack--')
7786

7887
# Change the title
7988

0 commit comments

Comments
 (0)