diff Python/import.c @ 76582:7025ee00dbf6

Issue #14605: Use None in sys.path_importer_cache to represent no finder instead of using some (now non-existent) implicit finder.
author Brett Cannon <brett@python.org>
date Fri, 27 Apr 2012 15:30:58 -0400
parents 1439e2d1f490
children eb5c5c23ca9b
line wrap: on
line diff
--- a/Python/import.c	Fri Apr 27 14:02:33 2012 -0400
+++ b/Python/import.c	Fri Apr 27 15:30:58 2012 -0400
@@ -1186,15 +1186,7 @@
         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);