diff options
Diffstat (limited to 'Lib/xml/sax/expatreader.py')
-rw-r--r-- | Lib/xml/sax/expatreader.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py index 2fc2b7c..eb46bcd 100644 --- a/Lib/xml/sax/expatreader.py +++ b/Lib/xml/sax/expatreader.py @@ -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 |