summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom/minidom.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-24 18:57:22 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-24 18:57:22 (GMT)
commit70e79803fcc93e19808faa240a5f5e4854d0b077 (patch)
tree0e862edc9d0ae630f673988401418df2bbce59d6 /Lib/xml/dom/minidom.py
parent75d38e992e9e3be428e51bcfe4bd5b201e953236 (diff)
downloadcpython-70e79803fcc93e19808faa240a5f5e4854d0b077.zip
cpython-70e79803fcc93e19808faa240a5f5e4854d0b077.tar.gz
cpython-70e79803fcc93e19808faa240a5f5e4854d0b077.tar.bz2
r698@Silves: collinwinter | 2007-08-24 10:57:15 -0700
Normalize raise statements in Lib/xml/.
Diffstat (limited to 'Lib/xml/dom/minidom.py')
-rw-r--r--Lib/xml/dom/minidom.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index fb57d58..0386288 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -541,7 +541,7 @@ class NamedNodeMap(object):
node.value = value
else:
if not isinstance(value, Attr):
- raise TypeError, "value must be a string or Attr object"
+ raise TypeError("value must be a string or Attr object")
node = value
self.setNamedItem(node)
@@ -1177,7 +1177,7 @@ class ReadOnlySequentialNamedNodeMap(object):
else:
node = self.getNamedItem(name_or_tuple)
if node is None:
- raise KeyError, name_or_tuple
+ raise KeyError(name_or_tuple)
return node
def item(self, index):
@@ -1607,7 +1607,7 @@ class Document(Node, DocumentLS):
def createTextNode(self, data):
if not isinstance(data, StringTypes):
- raise TypeError, "node contents must be a string"
+ raise TypeError("node contents must be a string")
t = Text()
t.data = data
t.ownerDocument = self
@@ -1615,7 +1615,7 @@ class Document(Node, DocumentLS):
def createCDATASection(self, data):
if not isinstance(data, StringTypes):
- raise TypeError, "node contents must be a string"
+ raise TypeError("node contents must be a string")
c = CDATASection()
c.data = data
c.ownerDocument = self