ISsue #14988: restore Python 2's behavior of raising ImportError when unable to load pyexpat, instead of a SystemError/RuntimeError

This commit is contained in:
Eli Bendersky 2012-07-17 14:20:38 +03:00
parent 954d46b2cc
commit 66099b0cdc

View file

@ -3117,6 +3117,8 @@ PyInit__elementtree(void)
expat_capi->MICRO_VERSION != XML_MICRO_VERSION)
expat_capi = NULL;
}
if (!expat_capi)
return NULL;
#endif
elementtree_parseerror_obj = PyErr_NewException(