mirror of
https://github.com/python/cpython.git
synced 2025-08-28 12:45:07 +00:00
Issue #15256: Re-use the ImportError exception message as defined by
importlib._bootstrap in imp to fix a grammatical mistake. Thanks to Marc Abramowitz for the patch.
This commit is contained in:
parent
cd9b746b37
commit
bf7eab077f
2 changed files with 3 additions and 1 deletions
|
@ -230,7 +230,7 @@ def find_module(name, path=None):
|
|||
continue
|
||||
break # Break out of outer loop when breaking out of inner loop.
|
||||
else:
|
||||
raise ImportError('No module name {!r}'.format(name), name=name)
|
||||
raise ImportError(_bootstrap._ERR_MSG.format(name), name=name)
|
||||
|
||||
encoding = None
|
||||
if mode == 'U':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue