Issue 21774: Fix a NameError in xml.dom.minidom (original) (raw)

Issue21774

Created on 2014-06-15 21:05 by Claudiu.Popa, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
minidom.patch Claudiu.Popa,2014-06-15 21:05 review
Messages (4)
msg220673 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-06-15 21:05
Hi. This patch fixes a NameError found in xml.dom.minidom. Here's an example for reproducing it: from xml.dom import minidom dom = minidom.parseString("1") pi = dom.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="mystyle.xslt"') pi.nodeValue = "4" with output: Traceback (most recent call last): File "a.py", line 5, in pi.nodeValue = "4" File "C:\Python34\lib\xml\dom\minidom.py", line 979, in _set_nodeValue self.data = data NameError: name 'data' is not defined
msg220681 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-15 21:50
New changeset ca33faa214ab by Raymond Hettinger in branch '3.4': Issue #21774: Fix incorrect variable in xml.dom.minidom http://hg.python.org/cpython/rev/ca33faa214ab
msg220682 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-06-15 21:54
Thanks for the patch. I'm curious how did you notice this?
msg220683 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-06-15 22:01
My pleasure. I run Pylint from time to time over stdlib in order to find false positives for Pylint and in the process I stumble across these type of bugs.
History
Date User Action Args
2022-04-11 14:58:04 admin set github: 65973
2014-06-15 22:01:21 Claudiu.Popa set messages: +
2014-06-15 21:54:59 rhettinger set status: open -> closedresolution: fixedmessages: + versions: + Python 3.4
2014-06-15 21:50:46 python-dev set nosy: + python-devmessages: +
2014-06-15 21:37:45 rhettinger set assignee: rhettingernosy: + rhettinger
2014-06-15 21:05:11 Claudiu.Popa create