diff options
author | Fred Drake <fdrake@acm.org> | 2000-09-21 16:32:28 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-09-21 16:32:28 (GMT) |
commit | 44627016da509b2bc59c38d7bf0ba592fe56a7a3 (patch) | |
tree | c70c8232a2f663660a822b20f82c9412d2a5023c /Lib/xml | |
parent | 1e3c8ccb9b65d0994dd09f8147f87d6affeaa552 (diff) | |
download | cpython-44627016da509b2bc59c38d7bf0ba592fe56a7a3.zip cpython-44627016da509b2bc59c38d7bf0ba592fe56a7a3.tar.gz cpython-44627016da509b2bc59c38d7bf0ba592fe56a7a3.tar.bz2 |
SAXException.__getitem__(): Raise AttributeError instead of NameError.
Diffstat (limited to 'Lib/xml')
-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 ===== |