summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-27 19:30:58 (GMT)
committerBrett Cannon <brett@python.org>2012-04-27 19:30:58 (GMT)
commitaa93642a35ed570ba91a80c583df2c8a383686d6 (patch)
treeba6049cf83600cb3afe6d9e8d52c0b9480b5b22b /Python/import.c
parent9e66ac683cce9f6e4abda7d01836dab70eeefb49 (diff)
downloadcpython-aa93642a35ed570ba91a80c583df2c8a383686d6.zip
cpython-aa93642a35ed570ba91a80c583df2c8a383686d6.tar.gz
cpython-aa93642a35ed570ba91a80c583df2c8a383686d6.tar.bz2
Issue #14605: Use None in sys.path_importer_cache to represent no
finder instead of using some (now non-existent) implicit finder.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Python/import.c b/Python/import.c
index 103e7de..a47e988 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1186,15 +1186,7 @@ get_path_importer(PyObject *path_importer_cache, PyObject *path_hooks,
PyErr_Clear();
}
if (importer == NULL) {
- importer = PyObject_CallFunctionObjArgs(
- (PyObject *)&PyNullImporter_Type, p, NULL
- );
- if (importer == NULL) {
- if (PyErr_ExceptionMatches(PyExc_ImportError)) {
- PyErr_Clear();
- return Py_None;
- }
- }
+ return Py_None;
}
if (importer != NULL) {
int err = PyDict_SetItem(path_importer_cache, p, importer);