Fix Grafana helm test exception error

Grafana helm test is failing with the below error
"NameError: name 'exception' is not defined"
This is because exception is defined in smaller case. changing
exception to Exception fixes this issue

Change-Id: I533ae822babb4f063242fee1cd42b5b821519b5f
Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
This commit is contained in:
Sreejith Punnapuzha 2019-06-28 15:55:12 -05:00
parent d7520fe006
commit 7314edc57d

View File

@ -67,7 +67,7 @@ logger.info("Attempting to open Grafana dashboard")
try:
browser = webdriver.Chrome('/etc/selenium/chromedriver', chrome_options=options)
logger.info("Successfully opened Grafana dashboard")
except exception, e:
except Exception as e:
logger.error("Unable to open Grafana")
browser.close()
sys.exit(1)
@ -79,7 +79,7 @@ try:
browser.find_element_by_name('password').send_keys(grafana_password)
browser.find_element_by_css_selector('body > grafana-app > div.main-view > div > div:nth-child(1) > div > div > div.login-inner-box > form > div.login-button-group > button').click()
logger.info("Successfully logged in to Grafana")
except exception, e:
except Exception as e:
logger.error("Failed to log in to Grafana")
browser.close()
sys.exit(1)