make sure we fail properly

This commit is contained in:
Andrew Dolgov 2023-10-22 13:44:37 +03:00
parent db05575b2d
commit efd5d79dde
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
1 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,8 @@
#!/usr/bin/python3 #!/usr/bin/python3
import os import os
import sys
import traceback import traceback
import time
from selenium import webdriver from selenium import webdriver
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
@ -32,11 +32,13 @@ try:
print("checking for feedTree...") print("checking for feedTree...")
assert driver.find_element(by=By.CSS_SELECTOR, value="#zfeedTree") assert driver.find_element(by=By.CSS_SELECTOR, value="#feedTree")
print("all done.") print("all done.")
except Exception: except Exception:
traceback.print_exc() traceback.print_exc()
sys.exit(1)
finally: finally:
driver.quit() driver.quit()