From 4780c5a6d78a2004a0b018a7c12cc0cf7149116d Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Sat, 3 Apr 2021 23:00:32 -0700 Subject: [PATCH] bugfix; force list for modules check previously could have been any sequence, hpi doctor with no args would fail --- my/core/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/my/core/__main__.py b/my/core/__main__.py index e824e51..a995fec 100644 --- a/my/core/__main__.py +++ b/my/core/__main__.py @@ -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.') -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 you're checking specific modules, show errors # 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 mods: Iterable[HPIModule] - if for_modules == []: + if len(for_modules) == 0: mods = _modules(all=list_all) else: 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: config_ok() # 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')