summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2010-07-25 23:49:57 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2010-07-25 23:49:57 (GMT)
commit53f94d07532024b49075ca03acda3e170e74859a (patch)
tree33a0b340d23195bf394efd95ef544edac6551ed0 /Lib/xml/dom
parent2a91ce8960d98fe2c98936a73d5e0e7a24856824 (diff)
downloadcpython-53f94d07532024b49075ca03acda3e170e74859a.zip
cpython-53f94d07532024b49075ca03acda3e170e74859a.tar.gz
cpython-53f94d07532024b49075ca03acda3e170e74859a.tar.bz2
Merged revisions 83152 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83152 | andrew.kuchling | 2010-07-25 19:38:47 -0400 (Sun, 25 Jul 2010) | 1 line #777884: make .normalize() do nothing for childless nodes, instead of raising an exception ........
Diffstat (limited to 'Lib/xml/dom')
-rw-r--r--Lib/xml/dom/minidom.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 02e3b85..12b7afc 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -890,6 +890,10 @@ class Childless:
raise xml.dom.NotFoundErr(
self.nodeName + " nodes do not have children")
+ def normalize(self):
+ # For childless nodes, normalize() has nothing to do.
+ pass
+
def replaceChild(self, newChild, oldChild):
raise xml.dom.HierarchyRequestErr(
self.nodeName + " nodes do not have children")