commit | b855134a0d9f8e505c51ade315912cf030e46ccc | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Oct 02 18:33:11 2001 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Oct 02 18:33:11 2001 +0000 |
tree | 7d2ca6767f667cb63ac3c26bb312491ef88aced0 | |
parent | e37e96df064c7b019111b6f3d06fcbc8797c0514 [diff] [blame] |
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.
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 @@ try: from xml.parsers import expat + if not hasattr(expat, "ParserCreate"): + raise ImportError, "ParserCreate" except ImportError: ExpatParser = None else: