Clarify error message in case no collectors are found for a file
This commit is contained in:
parent
00ad12b9db
commit
1f10c59cd3
|
@ -645,9 +645,12 @@ class Session(nodes.FSCollector):
|
||||||
self.trace.root.indent -= 1
|
self.trace.root.indent -= 1
|
||||||
if self._notfound:
|
if self._notfound:
|
||||||
errors = []
|
errors = []
|
||||||
for arg, cols in self._notfound:
|
for arg, collectors in self._notfound:
|
||||||
line = f"(no name {arg!r} in any of {cols!r})"
|
if cols:
|
||||||
errors.append(f"not found: {arg}\n{line}")
|
errors.append(f"not found: {arg}\n(no name {arg!r} in any of {collectors!r})")
|
||||||
|
else:
|
||||||
|
errors.append(f"found no collectors for {arg}")
|
||||||
|
|
||||||
raise UsageError(*errors)
|
raise UsageError(*errors)
|
||||||
if not genitems:
|
if not genitems:
|
||||||
items = rep.result
|
items = rep.result
|
||||||
|
|
Loading…
Reference in New Issue