diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-14 21:38:52 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-14 21:38:52 (GMT) |
commit | 5eb4f59cd91218f5a5597d39472ea048ef27169e (patch) | |
tree | 52e4f59ea23a0ac4080a7d877d88ebe9acf714a0 /Python | |
parent | 46ef31953e633993e9b97ece6b0d60ed4d3af55f (diff) | |
download | cpython-5eb4f59cd91218f5a5597d39472ea048ef27169e.zip cpython-5eb4f59cd91218f5a5597d39472ea048ef27169e.tar.gz cpython-5eb4f59cd91218f5a5597d39472ea048ef27169e.tar.bz2 |
Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject()
failure
Diffstat (limited to 'Python')
-rw-r--r-- | Python/import.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index ad181a2..f0ac051 100644 --- a/Python/import.c +++ b/Python/import.c @@ -948,8 +948,12 @@ static int 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++) { |