From: Georg Brandl Date: Wed, 24 Aug 2005 07:36:21 +0000 (+0000) Subject: backport bug [ 1192315 ] 'clear -1' in pdb X-Git-Tag: v2.4.2c1~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00ccbb67183641114dfeb119d5efed2d2d5282d4;p=thirdparty%2FPython%2Fcpython.git backport bug [ 1192315 ] 'clear -1' in pdb --- diff --git a/Lib/pdb.py b/Lib/pdb.py index 7b5dffa3b647..b00f68b79d50 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -450,11 +450,14 @@ class Pdb(bdb.Bdb, cmd.Cmd): return numberlist = arg.split() for i in numberlist: + if not (0 <= i < len(bdb.Breakpoint.bpbynumber)): + print 'No breakpoint numbered', i + continue err = self.clear_bpbynumber(i) if err: print '***', err else: - print 'Deleted breakpoint %s ' % (i,) + print 'Deleted breakpoint', i do_cl = do_clear # 'c' is already an abbreviation for 'continue' def do_where(self, arg): diff --git a/Misc/NEWS b/Misc/NEWS index 55219f54d9d3..48a7d89b2c24 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -70,6 +70,8 @@ Library - The sets module can now properly compute s-=s and s^=s as an empty set. +- Bug #1192315: Disallow negative arguments to clear() in pdb. + - Patch #827386: Support absolute source paths in msvccompiler.py. - Fix a problem in Tkinter introduced by SF patch #869468: delete bogus