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.
1 parent 6e571d6 commit ef391acCopy full SHA for ef391ac
1 file changed
Modules/_elementtree.c
@@ -3114,11 +3114,14 @@ PyInit__elementtree(void)
3114
expat_capi->size < sizeof(struct PyExpat_CAPI) ||
3115
expat_capi->MAJOR_VERSION != XML_MAJOR_VERSION ||
3116
expat_capi->MINOR_VERSION != XML_MINOR_VERSION ||
3117
- expat_capi->MICRO_VERSION != XML_MICRO_VERSION)
3118
- expat_capi = NULL;
3119
- }
3120
- if (!expat_capi)
+ expat_capi->MICRO_VERSION != XML_MICRO_VERSION) {
+ PyErr_SetString(PyExc_ImportError,
+ "pyexpat version is incompatible");
+ return NULL;
3121
+ }
3122
+ } else {
3123
return NULL;
3124
3125
#endif
3126
3127
elementtree_parseerror_obj = PyErr_NewException(
0 commit comments