SAXException.__getitem__(): Raise AttributeError instead of NameError.
This commit is contained in:
parent
1e3c8ccb9b
commit
44627016da
|
@ -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 =====
|
||||
|
|
Loading…
Reference in New Issue