From 44627016da509b2bc59c38d7bf0ba592fe56a7a3 Mon Sep 17 00:00:00 2001
From: Fred Drake <fdrake@acm.org>
Date: Thu, 21 Sep 2000 16:32:28 +0000
Subject: [PATCH] SAXException.__getitem__():  Raise AttributeError instead of
 NameError.

---
 Lib/xml/sax/_exceptions.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Lib/xml/sax/_exceptions.py b/Lib/xml/sax/_exceptions.py
index 1553b93afb..c02974fb8e 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 =====
-- 
2.40.0