From 7314edc57d8a057bcb5330dc9022e0bcf0e7e71e Mon Sep 17 00:00:00 2001 From: Sreejith Punnapuzha Date: Fri, 28 Jun 2019 15:55:12 -0500 Subject: [PATCH] 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 --- grafana/templates/bin/_selenium-tests.py.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grafana/templates/bin/_selenium-tests.py.tpl b/grafana/templates/bin/_selenium-tests.py.tpl index 15d89b6b8..d32d126f6 100644 --- a/grafana/templates/bin/_selenium-tests.py.tpl +++ b/grafana/templates/bin/_selenium-tests.py.tpl @@ -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)