mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
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:
parent
954d46b2cc
commit
66099b0cdc
1 changed files with 2 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue