Commit 697a7c53 authored by Fred Drake's avatar Fred Drake

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

parent eb514862
......@@ -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 =====
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment