Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2731c04 + ef391ac commit 7b31b1aCopy full SHA for 7b31b1a
1 file changed
Modules/_elementtree.c
@@ -3511,11 +3511,13 @@ PyInit__elementtree(void)
3511
expat_capi->MAJOR_VERSION != XML_MAJOR_VERSION ||
3512
expat_capi->MINOR_VERSION != XML_MINOR_VERSION ||
3513
expat_capi->MICRO_VERSION != XML_MICRO_VERSION) {
3514
- expat_capi = NULL;
+ PyErr_SetString(PyExc_ImportError,
3515
+ "pyexpat version is incompatible");
3516
+ return NULL;
3517
}
- }
- if (!expat_capi)
3518
+ } else {
3519
return NULL;
3520
+ }
3521
3522
elementtree_parseerror_obj = PyErr_NewException(
3523
"xml.etree.ElementTree.ParseError", PyExc_SyntaxError, NULL
0 commit comments