From 5e58b540451fe7892f824bcc6b691c61ffd6a3d7 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Fri, 10 Aug 2018 21:35:11 +0200 Subject: T666, T616: exit from op mode script if VRRP information is not available. --- src/op_mode/vrrp.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/op_mode/vrrp.py') 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() -- cgit v1.2.3