mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -6,7 +6,10 @@ pyexpat.__version__ == '2.22'.
|
|||
version = "0.20"
|
||||
|
||||
from xml.sax._exceptions import *
|
||||
from xml.parsers import expat
|
||||
try:
|
||||
from xml.parsers import expat
|
||||
except ImportError:
|
||||
raise SAXReaderNotAvailable("expat not supported",None)
|
||||
from xml.sax import xmlreader, saxutils, handler
|
||||
|
||||
AttributesImpl = xmlreader.AttributesImpl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue