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 a815f20 commit a8c9468Copy full SHA for a8c9468
Python/importdl.c
@@ -256,6 +256,7 @@ _PyImport_RunModInitFunc(PyModInitFunction p0,
256
257
res.def = PyModule_GetDef(m);
258
if (res.def == NULL) {
259
+ PyErr_Clear();
260
PyErr_Format(PyExc_SystemError,
261
"initialization of %s did not return an extension "
262
"module", name_buf);
@@ -266,10 +267,12 @@ _PyImport_RunModInitFunc(PyModInitFunction p0,
266
267
res.def->m_base.m_init = p0;
268
}
269
270
+ assert(!PyErr_Occurred());
271
*p_res = res;
272
return 0;
273
274
error:
275
+ assert(PyErr_Occurred());
276
Py_CLEAR(res.module);
277
res.def = NULL;
278
0 commit comments