diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-08-10 21:35:11 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-08-10 21:35:11 +0200 |
commit | 5e58b540451fe7892f824bcc6b691c61ffd6a3d7 (patch) | |
tree | 640c176fbc1ab50d9fb75169a3e554b3cf6b2efb /src/op_mode | |
parent | 6717754910504891a298b5ce3ff56adaf4ac617c (diff) | |
download | vyos-1x-5e58b540451fe7892f824bcc6b691c61ffd6a3d7.tar.gz vyos-1x-5e58b540451fe7892f824bcc6b691c61ffd6a3d7.zip |
T666, T616: exit from op mode script if VRRP information is not available.
Diffstat (limited to 'src/op_mode')
-rwxr-xr-x | src/op_mode/vrrp.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/op_mode/vrrp.py b/src/op_mode/vrrp.py index ba8b56de3..54e1bfb57 100755 --- a/src/op_mode/vrrp.py +++ b/src/op_mode/vrrp.py @@ -34,6 +34,7 @@ def print_summary(): json_data = vyos.keepalived.get_json_data() except: print("VRRP information is not available") + sys.exit(1) groups = [] for group in json_data: @@ -64,6 +65,7 @@ def print_statistics(): print(output) except: print("VRRP statistics are not available") + sys.exit(1) def print_state_data(): try: @@ -73,6 +75,7 @@ def print_state_data(): print(output) except: print("VRRP information is not available") + sys.exit(1) parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group() |