Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fd43b4d

Browse files
committed
replace threw with raised (#16714)
2 parents aa03a1f + 1f415cf commit fd43b4d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/pkgutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def find_loader(fullname):
503503
except (ImportError, AttributeError, TypeError, ValueError) as ex:
504504
# This hack fixes an impedance mismatch between pkgutil and
505505
# importlib, where the latter raises other errors for cases where
506-
# pkgutil previously threw ImportError
506+
# pkgutil previously raised ImportError
507507
msg = "Error while finding loader for {!r} ({}: {})"
508508
raise ImportError(msg.format(fullname, type(ex), ex)) from ex
509509

Lib/test/test_urllib2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ def test_proxy_basic_auth(self):
13021302
)
13031303

13041304
def test_basic_and_digest_auth_handlers(self):
1305-
# HTTPDigestAuthHandler threw an exception if it couldn't handle a 40*
1305+
# HTTPDigestAuthHandler raised an exception if it couldn't handle a 40*
13061306
# response (http://python.org/sf/1479302), where it should instead
13071307
# return None to allow another handler (especially
13081308
# HTTPBasicAuthHandler) to handle the response.

Lib/test/test_winreg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def run(self):
277277

278278
def test_long_key(self):
279279
# Issue2810, in 2.6 and 3.1 when the key name was exactly 256
280-
# characters, EnumKey threw "WindowsError: More data is
280+
# characters, EnumKey raised "WindowsError: More data is
281281
# available"
282282
name = 'x'*256
283283
try:

0 commit comments

Comments
 (0)