summaryrefslogtreecommitdiff
path: root/Lib/xmlrpclib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-02 18:33:11 +0000
committerGuido van Rossum <guido@python.org>2001-10-02 18:33:11 +0000
commitb855134a0d9f8e505c51ade315912cf030e46ccc (patch)
tree7d2ca6767f667cb63ac3c26bb312491ef88aced0 /Lib/xmlrpclib.py
parente37e96df064c7b019111b6f3d06fcbc8797c0514 (diff)
downloadcpython-git-b855134a0d9f8e505c51ade315912cf030e46ccc.tar.gz
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/xmlrpclib.py')
-rw-r--r--Lib/xmlrpclib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
index 3524a45bda..4e98c4c802 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: