mirror of
https://github.com/python/cpython.git
synced 2024-11-29 21:05:33 +08:00
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
Block a user