[Python-checkins] cpython (merge 3.3 -> default): replace threw with raised (#16714)
andrew.svetlov
python-checkins at python.org
Wed Dec 19 21:55:59 CET 2012
http://hg.python.org/cpython/rev/3594175c6860
changeset: 80951:3594175c6860
parent: 80946:e3f481deaed5
parent: 80950:55d86476d048
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Wed Dec 19 22:55:40 2012 +0200
summary:
replace threw with raised (#16714)
files:
Lib/pkgutil.py | 2 +-
Lib/test/test_urllib2.py | 2 +-
Lib/test/test_winreg.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py
--- a/Lib/pkgutil.py
+++ b/Lib/pkgutil.py
@@ -503,7 +503,7 @@
except (ImportError, AttributeError, TypeError, ValueError) as ex:
# This hack fixes an impedance mismatch between pkgutil and
# importlib, where the latter raises other errors for cases where
- # pkgutil previously threw ImportError
+ # pkgutil previously raised ImportError
msg = "Error while finding loader for {!r} ({}: {})"
raise ImportError(msg.format(fullname, type(ex), ex)) from ex
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -1302,7 +1302,7 @@
)
def test_basic_and_digest_auth_handlers(self):
- # HTTPDigestAuthHandler threw an exception if it couldn't handle a 40*
+ # HTTPDigestAuthHandler raised an exception if it couldn't handle a 40*
# response (http://python.org/sf/1479302), where it should instead
# return None to allow another handler (especially
# HTTPBasicAuthHandler) to handle the response.
diff --git a/Lib/test/test_winreg.py b/Lib/test/test_winreg.py
--- a/Lib/test/test_winreg.py
+++ b/Lib/test/test_winreg.py
@@ -277,7 +277,7 @@
def test_long_key(self):
# Issue2810, in 2.6 and 3.1 when the key name was exactly 256
- # characters, EnumKey threw "WindowsError: More data is
+ # characters, EnumKey raised "WindowsError: More data is
# available"
name = 'x'*256
try:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list