[Python-checkins] cpython: Issue #15256: Re-use the ImportError exception message as defined by
brett.cannon
python-checkins at python.org
Mon Jul 9 19:24:43 CEST 2012
http://hg.python.org/cpython/rev/75831951a6b5
changeset: 78025:75831951a6b5
user: Brett Cannon <brett at python.org>
date: Mon Jul 09 13:24:34 2012 -0400
summary:
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.
files:
Lib/imp.py | 2 +-
Misc/NEWS | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/imp.py b/Lib/imp.py
--- a/Lib/imp.py
+++ b/Lib/imp.py
@@ -230,7 +230,7 @@
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':
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -31,6 +31,8 @@
Library
-------
+- Issue #15256: Grammatical mistake in exception raised by imp.find_module().
+
- Issue #5931: wsgiref environ variable SERVER_SOFTWARE will specify an
implementation specific term like Cpython, Jython instead of generic "Python"
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list