diff Python/import.c @ 84444:e3ec8b176a80

Issue #15767: Revert 3a50025f1900 for ModuleNotFoundError
author Brett Cannon <brett@python.org>
date Thu, 04 Jul 2013 17:48:16 -0400
parents a39d2223be23
children 6bd01a59762a
line wrap: on
line diff
--- a/Python/import.c	Thu Jul 04 17:44:08 2013 -0400
+++ b/Python/import.c	Thu Jul 04 17:48:16 2013 -0400
@@ -1428,8 +1428,7 @@
         PyObject *msg = PyUnicode_FromFormat("import of %R halted; "
                                              "None in sys.modules", abs_name);
         if (msg != NULL) {
-            PyErr_SetImportErrorSubclass(PyExc_ModuleNotFoundError, msg,
-                    abs_name, NULL);
+            PyErr_SetImportError(msg, abs_name, NULL);
             Py_DECREF(msg);
         }
         mod = NULL;