summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorKevin Kirsche <Kev.Kirsche+GitHub@gmail.com>2022-08-23 16:16:02 (GMT)
committerGitHub <noreply@github.com>2022-08-23 16:16:02 (GMT)
commit58f6953d6d3fe20d972bfa2f6e982206adcf1353 (patch)
tree9b2a12f61672ca83d915b4e9e7652d94efd748d8 /Lib/xml
parent575f8880bf8498ee05a8e197fc2ed85db6880361 (diff)
downloadcpython-58f6953d6d3fe20d972bfa2f6e982206adcf1353.zip
cpython-58f6953d6d3fe20d972bfa2f6e982206adcf1353.tar.gz
cpython-58f6953d6d3fe20d972bfa2f6e982206adcf1353.tar.bz2
gh-96175: add missing self._localName assignment in `xml.dom.minidom.Attr` (#96176)
X-Ref: https://github.com/python/typeshed/pull/8590#discussion_r951473977 Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/dom/minidom.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index d09ef5e..ef8a159 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -358,6 +358,8 @@ class Attr(Node):
self._name = qName
self.namespaceURI = namespaceURI
self._prefix = prefix
+ if localName is not None:
+ self._localName = localName
self.childNodes = NodeList()
# Add the single child node that represents the value of the attr