summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-07-16 20:37:14 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-08-04 21:19:36 -0500
commitad87ea82cbd2382f062b1158f72ca57ac8542be2 (patch)
tree9844ba05eb7ea8536fe80b6417549183db35473c /src
parent35f333b26326940e5e0cf3f97eb99dbb55a77e08 (diff)
downloadvyos-1x-ad87ea82cbd2382f062b1158f72ca57ac8542be2.tar.gz
vyos-1x-ad87ea82cbd2382f062b1158f72ca57ac8542be2.zip
T7688: make exit error and output of wrapper script handle all cases
Diffstat (limited to 'src')
-rwxr-xr-xsrc/helpers/vyconf_cli.py11
1 files changed, 7 insertions, 4 deletions
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)