mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Add SAXReaderNotAvailable, and use it to distinguish between an
ImportError, and a missing driver.
This commit is contained in:
parent
75698a4937
commit
962c9e7f91
5 changed files with 44 additions and 5 deletions
|
@ -104,3 +104,13 @@ class SAXNotSupportedException(SAXException):
|
|||
perform is requested (specifically setting a state or value). SAX
|
||||
applications and extensions may use this class for similar
|
||||
purposes."""
|
||||
|
||||
# ===== SAXNOTSUPPORTEDEXCEPTION =====
|
||||
|
||||
class SAXReaderNotAvailable(SAXNotSupportedException):
|
||||
"""Exception class for a missing driver.
|
||||
|
||||
An XMLReader module (driver) should raise this exception when it
|
||||
is first imported, e.g. when a support module cannot be imported.
|
||||
It also may be raised during parsing, e.g. if executing an external
|
||||
program is not permitted."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue