]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
(Backport.)
authorGuido van Rossum <guido@python.org>
Fri, 12 Jul 2002 13:12:44 +0000 (13:12 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 12 Jul 2002 13:12:44 +0000 (13:12 +0000)
Fix SF bug 579701 (Fernando PĂ©rez); an input line consisting of one or
more spaces only crashed pdb.

Lib/pdb.py

index 1286f122ba0d3e523a090ad38ce7e547b721585b..7ff994d14b08e7ac64e3658a630fb1b0b5c0db76 100755 (executable)
@@ -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 self.aliases.has_key(args[0]):