Commit 44590e47 authored by Brett Cannon's avatar Brett Cannon

Add some comments.

parent 2217c46a
...@@ -805,6 +805,7 @@ class _FileFinder: ...@@ -805,6 +805,7 @@ class _FileFinder:
else: else:
cache = self._path_cache cache = self._path_cache
cache_module = tail_module cache_module = tail_module
# Check if the module is the name of a directory (and thus a package).
if cache_module in cache: if cache_module in cache:
base_path = _path_join(self.path, tail_module) base_path = _path_join(self.path, tail_module)
if _path_isdir(base_path): if _path_isdir(base_path):
...@@ -816,6 +817,7 @@ class _FileFinder: ...@@ -816,6 +817,7 @@ class _FileFinder:
else: else:
msg = "Not importing directory {}: missing __init__" msg = "Not importing directory {}: missing __init__"
_warnings.warn(msg.format(base_path), ImportWarning) _warnings.warn(msg.format(base_path), ImportWarning)
# Check for a file w/ a proper suffix exists.
for suffix, loader in self.modules: for suffix, loader in self.modules:
if cache_module + suffix in cache: if cache_module + suffix in cache:
full_path = _path_join(self.path, tail_module + suffix) full_path = _path_join(self.path, tail_module + suffix)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment