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

Skip to content

Commit 1f415cf

Browse files
committed
replace threw with raised (#16714)
2 parents 08d0272 + 7bd61cb commit 1f415cf

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
@@ -505,7 +505,7 @@ def find_loader(fullname):
505505
except (ImportError, AttributeError, TypeError, ValueError) as ex:
506506
# This hack fixes an impedance mismatch between pkgutil and
507507
# importlib, where the latter raises other errors for cases where
508-
# pkgutil previously threw ImportError
508+
# pkgutil previously raised ImportError
509509
msg = "Error while finding loader for {!r} ({}: {})"
510510
raise ImportError(msg.format(fullname, type(ex), ex)) from ex
511511

Lib/test/test_urllib2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ def test_proxy_basic_auth(self):
12881288
)
12891289

12901290
def test_basic_and_digest_auth_handlers(self):
1291-
# HTTPDigestAuthHandler threw an exception if it couldn't handle a 40*
1291+
# HTTPDigestAuthHandler raised an exception if it couldn't handle a 40*
12921292
# response (http://python.org/sf/1479302), where it should instead
12931293
# return None to allow another handler (especially
12941294
# 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)