]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Closes #17154: error out gracefully on "ignore" or "condition" without argument.
authorGeorg Brandl <georg@python.org>
Mon, 14 Oct 2013 14:08:15 +0000 (16:08 +0200)
committerGeorg Brandl <georg@python.org>
Mon, 14 Oct 2013 14:08:15 +0000 (16:08 +0200)
Lib/pdb.py

index b4a19e413121c910bd514f84e1160fb3d08dbbdd..80cba9d36c46dc902eeebe989d6daf91435c0179 100755 (executable)
@@ -805,6 +805,8 @@ class Pdb(bdb.Bdb, cmd.Cmd):
             cond = None
         try:
             bp = self.get_bpbynumber(args[0].strip())
+        except IndexError:
+            self.error('Breakpoint number expected')
         except ValueError as err:
             self.error(err)
         else:
@@ -832,6 +834,8 @@ class Pdb(bdb.Bdb, cmd.Cmd):
             count = 0
         try:
             bp = self.get_bpbynumber(args[0].strip())
+        except IndexError:
+            self.error('Breakpoint number expected')
         except ValueError as err:
             self.error(err)
         else: