There was an error while loading. Please reload this page.
1 parent 848ee09 commit 7ce57d6Copy full SHA for 7ce57d6
1 file changed
Python/importdl.c
@@ -97,8 +97,12 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
97
98
/* Remember pointer to module init function. */
99
def = PyModule_GetDef(m);
100
- if (def == NULL)
+ if (def == NULL) {
101
+ PyErr_Format(PyExc_SystemError,
102
+ "initialization of %s did not return an extension "
103
+ "module", shortname);
104
goto error;
105
+ }
106
def->m_base.m_init = p;
107
108
/* Remember the filename as the __file__ attribute */
0 commit comments