diff options
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 6382079..ccdea85 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -926,7 +926,7 @@ def _sanity_check(name, package, level): raise ValueError('level must be >= 0') if package: if not isinstance(package, str): - raise ValueError("__package__ not set to a string") + raise TypeError("__package__ not set to a string") elif package not in sys.modules: msg = ("Parent module {0!r} not loaded, cannot perform relative " "import") |