summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax/xmlreader.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xml/sax/xmlreader.py')
-rw-r--r--Lib/xml/sax/xmlreader.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/xml/sax/xmlreader.py b/Lib/xml/sax/xmlreader.py
index 4503315..6264ee3 100644
--- a/Lib/xml/sax/xmlreader.py
+++ b/Lib/xml/sax/xmlreader.py
@@ -295,12 +295,12 @@ class AttributesImpl:
def getNameByQName(self, name):
if name not in self._attrs:
- raise KeyError, name
+ raise KeyError(name)
return name
def getQNameByName(self, name):
if name not in self._attrs:
- raise KeyError, name
+ raise KeyError(name)
return name
def getNames(self):
@@ -350,14 +350,14 @@ class AttributesNSImpl(AttributesImpl):
if qname == name:
return self._attrs[nsname]
- raise KeyError, name
+ raise KeyError(name)
def getNameByQName(self, name):
for (nsname, qname) in self._qnames.items():
if qname == name:
return nsname
- raise KeyError, name
+ raise KeyError(name)
def getQNameByName(self, name):
return self._qnames[name]