diff options
author | Brett Cannon <brett@python.org> | 2016-07-15 17:58:54 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-07-15 17:58:54 (GMT) |
commit | f76457e12203d301c94e33957ff7121a24856b83 (patch) | |
tree | 4c536800b7fbda8ba1530b55a4f04f61eea85e6e /Lib/imp.py | |
parent | 5d9c7ed55aa824782a6dcd4db355ef2d3d03fb8a (diff) | |
download | cpython-f76457e12203d301c94e33957ff7121a24856b83.zip cpython-f76457e12203d301c94e33957ff7121a24856b83.tar.gz cpython-f76457e12203d301c94e33957ff7121a24856b83.tar.bz2 |
Issue #26844: Fix imp.find_module() to have the exception related to
type issues be about 'path' instead of 'name'.
Thanks to Lev Maximov for the patch.
Diffstat (limited to 'Lib/imp.py')
-rw-r--r-- | Lib/imp.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -266,8 +266,8 @@ def find_module(name, path=None): raise TypeError("'name' must be a str, not {}".format(type(name))) elif not isinstance(path, (type(None), list)): # Backwards-compatibility - raise RuntimeError("'list' must be None or a list, " - "not {}".format(type(name))) + raise RuntimeError("'path' must be None or a list, " + "not {}".format(type(path))) if path is None: if is_builtin(name): |