(original) (raw)
changeset: 84538:fce581643cb6 branch: 3.3 parent: 84536:4343dfaca8e2 user: Christian Heimes christian@cheimes.de date: Thu Jul 11 13:02:30 2013 +0200 files: Python/importdl.c description: Issue #18426: improve exception message. Courtesy of Amaury diff -r 4343dfaca8e2 -r fce581643cb6 Python/importdl.c --- a/Python/importdl.c Thu Jul 11 11:22:21 2013 +0200 +++ b/Python/importdl.c Thu Jul 11 13:02:30 2013 +0200 @@ -97,8 +97,12 @@ /* 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 */ /christian@cheimes.de