[issue28528] Pdb.checkline()

Thomas Kluyver report at bugs.python.org
Tue Oct 25 09:12:03 EDT 2016


New submission from Thomas Kluyver:

Pdb.checkline() does a hasattr() check to protect against self.curframe not existing. self.curframe can also be None (if self.forget() or self.reset() was called), but checkline() does not handle this.

The attached patch treats self.curframe == None as equivalent to the attribute being absent.

Background:
http://bugs.python.org/issue9230
https://github.com/ipython/ipython/issues/10028

(Georg, I've nosy-listed you as I saw your name on a couple of similar issues; I hope you don't mind)

----------
components: Library (Lib)
files: pdb-reset-checkline.patch
keywords: patch
messages: 279402
nosy: georg.brandl, takluyver
priority: normal
severity: normal
status: open
title: Pdb.checkline()
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45217/pdb-reset-checkline.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28528>
_______________________________________


More information about the Python-bugs-list mailing list