diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-14 22:38:52 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-14 22:38:52 +0100 |
commit | d65ab2d444f5d21586935abe6da2effeb98c498f (patch) | |
tree | 598db681b41ec2d8ab2cdc5661f8d02a7376570c /Python/import.c | |
parent | 4c31587fa5c07ca821be423305695621d4ecb425 (diff) | |
download | cpython-d65ab2d444f5d21586935abe6da2effeb98c498f.tar.gz |
Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject()
failure
Diffstat (limited to 'Python/import.c')
-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 ad181a2942..f0ac0515a0 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++) { |