mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #15767: Revert 3a50025f1900 for ModuleNotFoundError
This commit is contained in:
parent
45091c0a0c
commit
82da8886cc
10 changed files with 807 additions and 842 deletions
|
@ -1617,7 +1617,7 @@ def _gcd_import(name, package=None, level=0):
|
|||
_imp.release_lock()
|
||||
message = ("import of {} halted; "
|
||||
"None in sys.modules".format(name))
|
||||
raise ModuleNotFoundError(message, name=name)
|
||||
raise ImportError(message, name=name)
|
||||
_lock_unlock_module(name)
|
||||
return module
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue