Add SAXReaderNotAvailable, and use it to distinguish between an

ImportError, and a missing driver.
This commit is contained in:
Martin v. Löwis 2000-10-06 17:41:52 +00:00
parent 75698a4937
commit 962c9e7f91
5 changed files with 44 additions and 5 deletions

View file

@ -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