Under certain conditions (sometimes triggered by the test suite),
"from xml.parsers import expat" succeeds but the imported expat module is an empty shell. Make sure we don't be fooled by that.
This commit is contained in:
parent
e37e96df06
commit
b855134a0d
|
@ -361,6 +361,8 @@ else:
|
|||
|
||||
try:
|
||||
from xml.parsers import expat
|
||||
if not hasattr(expat, "ParserCreate"):
|
||||
raise ImportError, "ParserCreate"
|
||||
except ImportError:
|
||||
ExpatParser = None
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue