From d0ebb1092531d17b2c9b6b69a8464d615bf02ff0 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 2 Feb 2022 12:12:41 +0100 Subject: [PATCH] exit 1 if installation is not successful --- tests/install_console.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/install_console.py b/tests/install_console.py index a9310541fb..66d1c6de0c 100755 --- a/tests/install_console.py +++ b/tests/install_console.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # Script to install the Pandora FMS Console. import os +import sys from pyvirtualdisplay import Display from selenium import webdriver from selenium.common.exceptions import NoSuchElementException @@ -35,8 +36,10 @@ try: browser.find_element_by_name("rn_file").click() except AssertionError as error: print("Error " + str(error) + ":\n" + browser.page_source) + sys.exit(1) except NoSuchElementException as error: print("Error " + str(error) + ":\n" + browser.page_source) + sys.exit(1) # Clean-up browser.quit()