Commit 6cee9946 authored by Christian Heimes's avatar Christian Heimes

Issue #18426: improve exception message. Courtesy of Amaury

parents 5ec44649 7ce57d67
......@@ -97,8 +97,12 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
/* Remember pointer to module init function. */
def = PyModule_GetDef(m);
if (def == NULL)
if (def == NULL) {
PyErr_Format(PyExc_SystemError,
"initialization of %s did not return an extension "
"module", shortname);
goto error;
}
def->m_base.m_init = p;
/* Remember the filename as the __file__ attribute */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment