mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-23 05:45:59 +02:00
exit 1 if installation is not successful
This commit is contained in:
parent
17be6f3ca5
commit
d0ebb10925
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Script to install the Pandora FMS Console.
|
# Script to install the Pandora FMS Console.
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from pyvirtualdisplay import Display
|
from pyvirtualdisplay import Display
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
@ -35,8 +36,10 @@ try:
|
|||||||
browser.find_element_by_name("rn_file").click()
|
browser.find_element_by_name("rn_file").click()
|
||||||
except AssertionError as error:
|
except AssertionError as error:
|
||||||
print("Error " + str(error) + ":\n" + browser.page_source)
|
print("Error " + str(error) + ":\n" + browser.page_source)
|
||||||
|
sys.exit(1)
|
||||||
except NoSuchElementException as error:
|
except NoSuchElementException as error:
|
||||||
print("Error " + str(error) + ":\n" + browser.page_source)
|
print("Error " + str(error) + ":\n" + browser.page_source)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# Clean-up
|
# Clean-up
|
||||||
browser.quit()
|
browser.quit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user