summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-04-29 13:08:33 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-04-29 13:08:33 (GMT)
commit5c089314efb94d3ab4ddfea9c27d408e97ec3ff2 (patch)
tree7320d963eb87096ccf4897b033e0fc51cac81472 /Python/import.c
parent91c2f37e216acbb3f3e8c6662999889d9f34ef0e (diff)
parent7d110042c5a2b27ffd0b3ae25dc7722f2f8bc5c5 (diff)
downloadcpython-5c089314efb94d3ab4ddfea9c27d408e97ec3ff2.zip
cpython-5c089314efb94d3ab4ddfea9c27d408e97ec3ff2.tar.gz
cpython-5c089314efb94d3ab4ddfea9c27d408e97ec3ff2.tar.bz2
merge 3.3
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index 8773be4..805cdd7 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1403,7 +1403,8 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *given_globals,
if (builtins_import == NULL) {
builtins_import = _PyDict_GetItemId(interp->builtins, &PyId___import__);
if (builtins_import == NULL) {
- Py_FatalError("__import__ missing");
+ PyErr_SetString(PyExc_ImportError, "__import__ not found");
+ goto error_with_unlock;
}
}
Py_INCREF(builtins_import);