bugfix; force list for modules check
previously could have been any sequence, hpi doctor with no args would fail
This commit is contained in:
parent
316d2810d4
commit
4780c5a6d7
1 changed files with 3 additions and 3 deletions
|
@ -207,7 +207,7 @@ def _modules(*, all: bool=False) -> Iterable[HPIModule]:
|
||||||
warning(f'Skipped {len(skipped)} modules: {skipped}. Pass --all if you want to see them.')
|
warning(f'Skipped {len(skipped)} modules: {skipped}. Pass --all if you want to see them.')
|
||||||
|
|
||||||
|
|
||||||
def modules_check(verbose: bool, list_all: bool, quick: bool, for_modules: Sequence[str]) -> None:
|
def modules_check(verbose: bool, list_all: bool, quick: bool, for_modules: List[str]) -> None:
|
||||||
if len(for_modules) > 0:
|
if len(for_modules) > 0:
|
||||||
# if you're checking specific modules, show errors
|
# if you're checking specific modules, show errors
|
||||||
# hopefully makes sense?
|
# hopefully makes sense?
|
||||||
|
@ -223,7 +223,7 @@ def modules_check(verbose: bool, list_all: bool, quick: bool, for_modules: Seque
|
||||||
from .stats import guess_stats
|
from .stats import guess_stats
|
||||||
|
|
||||||
mods: Iterable[HPIModule]
|
mods: Iterable[HPIModule]
|
||||||
if for_modules == []:
|
if len(for_modules) == 0:
|
||||||
mods = _modules(all=list_all)
|
mods = _modules(all=list_all)
|
||||||
else:
|
else:
|
||||||
mods = [HPIModule(name=m, skip_reason=None) for m in for_modules]
|
mods = [HPIModule(name=m, skip_reason=None) for m in for_modules]
|
||||||
|
@ -370,7 +370,7 @@ def doctor_cmd(verbose: bool, list_all: bool, quick: bool, skip_conf: bool, modu
|
||||||
if not skip_conf:
|
if not skip_conf:
|
||||||
config_ok()
|
config_ok()
|
||||||
# TODO check that it finds private modules too?
|
# TODO check that it finds private modules too?
|
||||||
modules_check(verbose, list_all, quick, module)
|
modules_check(verbose, list_all, quick, list(module))
|
||||||
|
|
||||||
|
|
||||||
@main.group(name='config', short_help='work with configuration')
|
@main.group(name='config', short_help='work with configuration')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue