mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #15767: back out 8a0ed9f63c6e, finishing the removal of
ModuleNotFoundError.
This commit is contained in:
parent
82da8886cc
commit
679ecb565b
17 changed files with 412 additions and 427 deletions
|
@ -4588,7 +4588,7 @@ import_from(PyObject *v, PyObject *name)
|
|||
|
||||
x = PyObject_GetAttr(v, name);
|
||||
if (x == NULL && PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
||||
PyErr_Format(PyExc_ModuleNotFoundError, "cannot import name %S", name);
|
||||
PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue