From ad87ea82cbd2382f062b1158f72ca57ac8542be2 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 16 Jul 2025 20:37:14 -0500 Subject: T7688: make exit error and output of wrapper script handle all cases --- src/helpers/vyconf_cli.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/helpers/vyconf_cli.py b/src/helpers/vyconf_cli.py index 53542dd63..9a614675b 100755 --- a/src/helpers/vyconf_cli.py +++ b/src/helpers/vyconf_cli.py @@ -39,9 +39,12 @@ if hasattr(vs, func_name): else: sys.exit(f'Call unimplemented: {func_name}') -out = func() -if isinstance(out, bool): +res = func() +if isinstance(res, bool): # for use in shell scripts - sys.exit(int(not out)) + sys.exit(int(not res)) -print(out) +if isinstance(res, tuple): + out, err = res + print(out) + sys.exit(err) -- cgit v1.2.3