diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py index 3524a45bdaa..4e98c4c8026 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: