From 7d70e725168eba197d921129aec843cac670f592 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Mon, 30 Oct 2023 14:07:30 -0500 Subject: [PATCH] update --- hostapps/run.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hostapps/run.py b/hostapps/run.py index 88c888c..4d881b7 100644 --- a/hostapps/run.py +++ b/hostapps/run.py @@ -62,20 +62,12 @@ Config = TypeAdapter(dict[str, Entry]) @click.option("--ssh-command", default="ssh") @click.option("--telnet-command", default="telnet") @click.option("--config", type=click.Path(exists=True, path_type=pathlib.Path)) -@click.option("--name", type=str) def main( ssh_command: str, telnet_command: str, config: pathlib.Path, - name: str, ): - cfg = Config.validate_json(config.read_bytes()) - - if name not in cfg: - sys.stderr.write("unknown config entry!\n") - sys.exit(1) - - entry = cfg[name] + entry = Entry.validate_model_json(config.read_bytes()) a = pyansi.ANSI() sys.stdout.write(a.Title(text=f"{entry.name} - {entry.address}"))