summaryrefslogtreecommitdiff
path: root/Python/import.c
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-27 15:30:58 -0400
committerBrett Cannon <brett@python.org>2012-04-27 15:30:58 -0400
commit6389a78515e401399bbb9aa29fb76f193c22c101 (patch)
tree814bd347acb686ad0acb5d91978dc0bf38a1928a /Python/import.c
parentd3c8d447fe7ef7d2c3991778e502c3c4638bade2 (diff)
downloadcpython-6389a78515e401399bbb9aa29fb76f193c22c101.tar.gz
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 103e7de439..a47e9881b9 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);