Merge pull request #3798 from jonozzz/fix-3751

Fix #3751
This commit is contained in:
Ronny Pfannschmidt
2018-08-16 06:52:16 +02:00
committed by GitHub
2 changed files with 12 additions and 4 deletions

View File

@@ -505,8 +505,9 @@ class Session(nodes.FSCollector):
root = self._node_cache[pkginit]
else:
col = root._collectfile(pkginit)
if col and isinstance(col, Package):
root = col[0]
if col:
if isinstance(col[0], Package):
root = col[0]
self._node_cache[root.fspath] = root
# If it's a directory argument, recurse and look for any Subpackages.