diff options
author | John Estabrook <jestabro@vyos.io> | 2025-06-10 11:06:05 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2025-06-10 18:12:48 -0500 |
commit | 2ef19495e1a2750330a5a520f41601202ca2b703 (patch) | |
tree | 52cea259aa81313d78266357386d8d42622bd2fd /src/helpers/reset_section.py | |
parent | 4c1bffe71454c7f15ecc1fa27e4a3ecb1176361f (diff) | |
download | vyos-1x-2ef19495e1a2750330a5a520f41601202ca2b703.tar.gz vyos-1x-2ef19495e1a2750330a5a520f41601202ca2b703.zip |
T7488: exit silently if path doesn't exist, unless debug
Diffstat (limited to 'src/helpers/reset_section.py')
-rwxr-xr-x | src/helpers/reset_section.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/helpers/reset_section.py b/src/helpers/reset_section.py index f1e4cfc6c..32857f650 100755 --- a/src/helpers/reset_section.py +++ b/src/helpers/reset_section.py @@ -29,6 +29,7 @@ from vyos.xml_ref import is_leaf CFG_GROUP = 'vyattacfg' +DEBUG = False def type_str_to_list(value): @@ -58,7 +59,10 @@ try: if is_leaf(path): sys.exit('path is leaf node: neither allowed nor useful') except ValueError: - sys.exit('nonexistent path: neither allowed nor useful') + if DEBUG: + sys.exit('nonexistent path: neither allowed nor useful') + else: + sys.exit() test = Config() in_session = test.in_session() |