diff options
author | Guido van Rossum <guido@python.org> | 2001-10-02 18:33:11 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-10-02 18:33:11 (GMT) |
commit | b855134a0d9f8e505c51ade315912cf030e46ccc (patch) | |
tree | 7d2ca6767f667cb63ac3c26bb312491ef88aced0 /Lib | |
parent | e37e96df064c7b019111b6f3d06fcbc8797c0514 (diff) | |
download | cpython-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.py | 2 |
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: |