summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index afe69d2..3ef03a0 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -479,7 +479,12 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def do_condition(self, arg):
# arg is breakpoint number and condition
args = arg.split(' ', 1)
- bpnum = int(args[0].strip())
+ try:
+ bpnum = int(args[0].strip())
+ except ValueError:
+ # something went wrong
+ print >>self.stdout, \
+ 'Breakpoint index %r is not a number' % args[0]
try:
cond = args[1]
except:
@@ -494,7 +499,12 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def do_ignore(self,arg):
"""arg is bp number followed by ignore count."""
args = arg.split()
- bpnum = int(args[0].strip())
+ try:
+ bpnum = int(args[0].strip())
+ except ValueError:
+ # something went wrong
+ print >>self.stdout, \
+ 'Breakpoint index %r is not a number' % args[0]
try:
count = int(args[1].strip())
except: