summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-02 18:33:11 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-02 18:33:11 (GMT)
commitb855134a0d9f8e505c51ade315912cf030e46ccc (patch)
tree7d2ca6767f667cb63ac3c26bb312491ef88aced0 /Lib
parente37e96df064c7b019111b6f3d06fcbc8797c0514 (diff)
downloadcpython-b855134a0d9f8e505c51ade315912cf030e46ccc.zip
cpython-b855134a0d9f8e505c51ade315912cf030e46ccc.tar.gz
cpython-b855134a0d9f8e505c51ade315912cf030e46ccc.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/xmlrpclib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
index 3524a45..4e98c4c 100644
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -361,6 +361,8 @@ else:
try:
from xml.parsers import expat
+ if not hasattr(expat, "ParserCreate"):
+ raise ImportError, "ParserCreate"
except ImportError:
ExpatParser = None
else: