From 0079ffc0920b89e5ca3b70746c5cc91da7728ac3 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 14 Oct 2013 16:08:15 +0200 Subject: [PATCH] Closes #17154: error out gracefully on "ignore" or "condition" without argument. --- Lib/pdb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/pdb.py b/Lib/pdb.py index b4a19e41312..80cba9d36c4 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -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: