Make sure that max_workers is greater than 1 (#619)

This commit is contained in:
José Armando García Sancio
2016-05-20 10:46:08 -07:00
parent e1e0fba7a3
commit 04430b910a

View File

@@ -76,7 +76,7 @@ def _help(command):
results = [(c, default_command_info(c))
for c in subcommand.default_subcommands()]
paths = subcommand.list_paths()
with ThreadPoolExecutor(max_workers=len(paths)) as executor:
with ThreadPoolExecutor(max_workers=max(len(paths), 1)) as executor:
results += list(executor.map(subcommand.documentation, paths))
commands_message = options\
.make_command_summary_string(sorted(results))