mirror of
https://github.com/python/cpython.git
synced 2025-07-12 22:05:16 +00:00
replace threw with raised (#16714)
This commit is contained in:
commit
fd43b4d3e4
3 changed files with 3 additions and 3 deletions
|
@ -503,7 +503,7 @@ def find_loader(fullname):
|
|||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue