replace threw with raised (#16714)

This commit is contained in:
Andrew Svetlov 2012-12-19 22:55:40 +02:00
commit fd43b4d3e4
3 changed files with 3 additions and 3 deletions

View file

@ -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