diff options
Diffstat (limited to 'Lib/xml/sax')
-rw-r--r-- | Lib/xml/sax/_exceptions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xml/sax/_exceptions.py b/Lib/xml/sax/_exceptions.py index 1553b93..c02974f 100644 --- a/Lib/xml/sax/_exceptions.py +++ b/Lib/xml/sax/_exceptions.py @@ -37,7 +37,7 @@ class SAXException(Exception): def __getitem__(self, ix): """Avoids weird error messages if someone does exception[ix] by mistake, since Exception has __getitem__ defined.""" - raise NameError("__getitem__") + raise AttributeError("__getitem__") # ===== SAXPARSEEXCEPTION ===== |