SAXException.__getitem__(): Raise AttributeError instead of NameError.

This commit is contained in:
Fred Drake 2000-09-21 16:32:28 +00:00
parent 1e3c8ccb9b
commit 44627016da
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class SAXException(Exception):
def __getitem__(self, ix): def __getitem__(self, ix):
"""Avoids weird error messages if someone does exception[ix] by """Avoids weird error messages if someone does exception[ix] by
mistake, since Exception has __getitem__ defined.""" mistake, since Exception has __getitem__ defined."""
raise NameError("__getitem__") raise AttributeError("__getitem__")
# ===== SAXPARSEEXCEPTION ===== # ===== SAXPARSEEXCEPTION =====