mirror of
https://github.com/python/cpython.git
synced 2025-09-01 06:28:36 +00:00
Fix SF bug 579701 (Fernando Pérez); an input line consisting of one or
more spaces only crashed pdb. While I was at it, cleaned up some style nits (spaces between function and parenthesis, and redundant parentheses in if statement).
This commit is contained in:
parent
2ad9419c8f
commit
08454596d1
1 changed files with 8 additions and 8 deletions
|
@ -151,7 +151,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
|||
|
||||
def precmd(self, line):
|
||||
"""Handle alias expansion and ';;' separator."""
|
||||
if not line:
|
||||
if not line.strip():
|
||||
return line
|
||||
args = line.split()
|
||||
while args[0] in self.aliases:
|
||||
|
@ -401,9 +401,9 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
|||
bp = bdb.Breakpoint.bpbynumber[bpnum]
|
||||
if bp:
|
||||
bp.ignore = count
|
||||
if (count > 0):
|
||||
if count > 0:
|
||||
reply = 'Will ignore next '
|
||||
if (count > 1):
|
||||
if count > 1:
|
||||
reply = reply + '%d crossings' % count
|
||||
else:
|
||||
reply = reply + '1 crossing'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue