changeset: 87107:f7d401eaee0e user: Victor Stinner date: Thu Nov 14 22:38:52 2013 +0100 files: Python/import.c description: Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject() failure diff -r 61a712066770 -r f7d401eaee0e Python/import.c --- a/Python/import.c Thu Nov 14 22:31:41 2013 +0100 +++ b/Python/import.c Thu Nov 14 22:38:52 2013 +0100 @@ -948,8 +948,12 @@ init_builtin(PyObject *name) { struct _inittab *p; + PyObject *mod; - if (_PyImport_FindExtensionObject(name, name) != NULL) + mod = _PyImport_FindExtensionObject(name, name); + if (PyErr_Occurred()) + return -1; + if (mod != NULL) return 1; for (p = PyImport_Inittab; p->name != NULL; p++) {