Don't show function name if there is none

This commit is contained in:
Guido van Rossum 1998-10-15 12:18:49 +00:00
parent 0e56568a0d
commit b7ffca393f
1 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,9 @@ class Debugger(bdb.Bdb):
file = code.co_filename
base = os.path.basename(file)
lineno = frame.f_lineno
message = "%s:%s: %s()" % (base, lineno, code.co_name)
message = "%s:%s" % (base, lineno)
if code.co_name != "?":
message = "%s: %s()" % (message, code.co_name)
self.status.configure(text=message)
if info:
type, value, tb = info