From: Eli Bendersky Date: Tue, 17 Jul 2012 11:25:14 +0000 (+0300) Subject: Merge for #14988 X-Git-Tag: v3.3.0b2~176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b48ff7fdda149949c5af4123af9fec5aedc9f12b;p=python Merge for #14988 --- b48ff7fdda149949c5af4123af9fec5aedc9f12b diff --cc Modules/_elementtree.c index 6415797f56,d734c2637a..a7201a5fcf --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@@ -3510,19 -3114,15 +3510,15 @@@ PyInit__elementtree(void expat_capi->size < sizeof(struct PyExpat_CAPI) || expat_capi->MAJOR_VERSION != XML_MAJOR_VERSION || expat_capi->MINOR_VERSION != XML_MINOR_VERSION || - expat_capi->MICRO_VERSION != XML_MICRO_VERSION) + expat_capi->MICRO_VERSION != XML_MICRO_VERSION) { expat_capi = NULL; + } } - if (!expat_capi) { - PyErr_SetString( - PyExc_RuntimeError, "cannot load dispatch table from pyexpat" - ); + if (!expat_capi) return NULL; - } -#endif elementtree_parseerror_obj = PyErr_NewException( - "cElementTree.ParseError", PyExc_SyntaxError, NULL + "xml.etree.ElementTree.ParseError", PyExc_SyntaxError, NULL ); Py_INCREF(elementtree_parseerror_obj); PyModule_AddObject(m, "ParseError", elementtree_parseerror_obj);