From e18ce97d6695758844be18c5dec8e43e6cbd5c7b Mon Sep 17 00:00:00 2001 From: benoit Date: Thu, 9 Sep 2021 17:39:12 +0200 Subject: [PATCH] Add default value for verbose and fix the type in main parameters --- check_patroni/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_patroni/cli.py b/check_patroni/cli.py index 33fd13c..40b4f0f 100644 --- a/check_patroni/cli.py +++ b/check_patroni/cli.py @@ -109,6 +109,7 @@ def configure(ctx: click.Context, param: str, filename: str) -> None: "--verbose", "verbose", count=True, + default=0, help="Increase verbosity -v (info)/-vv (warning)/-vvv (debug)", ) @click.option( @@ -129,12 +130,11 @@ def main( cert_file: str, key_file: str, ca_file: str, - verbose: bool, + verbose: int, timeout: int, ) -> None: """Nagios plugin for patroni.""" ctx.obj = ConnectionInfo(endpoints, cert_file, key_file, ca_file) - # FIXME Not all "is/has" services have the same return code for ok. Check if it's ok