Kaydet (Commit) bf7eab07 authored tarafından Brett Cannon's avatar Brett Cannon

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.
üst cd9b746b
...@@ -230,7 +230,7 @@ def find_module(name, path=None): ...@@ -230,7 +230,7 @@ def find_module(name, path=None):
continue continue
break # Break out of outer loop when breaking out of inner loop. break # Break out of outer loop when breaking out of inner loop.
else: else:
raise ImportError('No module name {!r}'.format(name), name=name) raise ImportError(_bootstrap._ERR_MSG.format(name), name=name)
encoding = None encoding = None
if mode == 'U': if mode == 'U':
......
...@@ -31,6 +31,8 @@ Core and Builtins ...@@ -31,6 +31,8 @@ Core and Builtins
Library Library
------- -------
- Issue #15256: Grammatical mistake in exception raised by imp.find_module().
- Issue #5931: wsgiref environ variable SERVER_SOFTWARE will specify an - Issue #5931: wsgiref environ variable SERVER_SOFTWARE will specify an
implementation specific term like Cpython, Jython instead of generic "Python" implementation specific term like Cpython, Jython instead of generic "Python"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment