Kaydet (Commit) b6aa92eb authored tarafından Guido van Rossum's avatar Guido van Rossum

fix formatting of stack entries

üst 08e767bd
......@@ -253,8 +253,12 @@ class Bdb: # Basic Debugger
s = s + "<lambda>"
if frame.f_locals.has_key('__args__'):
args = frame.f_locals['__args__']
if args is not None:
s = s + repr.repr(args)
else:
args = None
if args:
s = s + repr.repr(args)
else:
s = s + '()'
if frame.f_locals.has_key('__return__'):
rv = frame.f_locals['__return__']
s = s + '->'
......
......@@ -62,8 +62,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def interaction(self, frame, traceback):
self.setup(frame, traceback)
self.print_stack_entry(self.stack[self.curindex],
line_prefix)
self.print_stack_entry(self.stack[self.curindex])
self.cmdloop()
self.forget()
......@@ -288,7 +287,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
except KeyboardInterrupt:
pass
def print_stack_entry(self, frame_lineno, prompt_prefix=''):
def print_stack_entry(self, frame_lineno, prompt_prefix=line_prefix):
frame, lineno = frame_lineno
if frame is self.curframe:
print '>',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment