Commit 9cb5ca98 authored by one's avatar one
Browse files

[hytop] Update help messages

parent 9e829f84
......@@ -37,18 +37,18 @@ def root(
"localhost",
"--hosts",
"-H",
help="Comma-separated hosts, e.g. node01,node02. Default: localhost",
help="Comma-separated hosts, e.g. node01,node02.",
),
interval: float = typer.Option(
1.0,
"--interval",
"-n",
help="Polling interval in seconds. Default: 1.0",
help="Polling interval in seconds.",
),
window: float = typer.Option(
5.0,
"--window",
help="Single rolling window in seconds. Default: 5.0",
help="Single rolling window in seconds.",
),
timeout: float | None = typer.Option(
None,
......@@ -57,6 +57,10 @@ def root(
),
) -> None:
"""Root callback that parses global options and stores them in context."""
if ctx.invoked_subcommand is None:
typer.echo(ctx.get_help())
raise typer.Exit()
try:
host_list = parse_csv_strings(hosts, "--hosts")
window_value = parse_positive_float(str(window), "--window")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment