diff options
author | stark, steven <ss820f@att.com> | 2018-03-20 15:10:51 -0700 |
---|---|---|
committer | stark, steven <ss820f@att.com> | 2018-03-20 15:10:51 -0700 |
commit | 0c1d5d8be71aa8d07c3c43dacc91b04a91ca1b80 (patch) | |
tree | 904a3f18dc6f83182129fb1a4f267ca2368b1d32 | |
parent | 71891b3040605103397ffa7fb349215eced3a2c3 (diff) |
VVP fixing flake 8 errors during build
modifed files to pass flake8
Change-Id: Id0edd7364aec13d5b01c12f6a9cac03ed3c70d93
Issue-ID: VVP-42
Signed-off-by: stark, steven <ss820f@att.com>
-rw-r--r-- | services/api/api_rados.py | 4 | ||||
-rw-r--r-- | services/frontend/base_actions/wait.py | 6 | ||||
-rw-r--r-- | services/frontend/fe_cms.py | 2 | ||||
-rw-r--r-- | services/frontend/fe_general.py | 2 | ||||
-rw-r--r-- | tests/uiTests/test_left_nav_panel.py | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/services/api/api_rados.py b/services/api/api_rados.py index cdad7d4..9a130b1 100644 --- a/services/api/api_rados.py +++ b/services/api/api_rados.py @@ -82,7 +82,7 @@ class APIRados: logger.error("Bucket not found. Retry #%s" % counter+1) time.sleep(session.wait_until_time_pause_long) else: - raise TimeoutError("Max retries exceeded, failing test...") + raise Exception("Max retries exceeded, failing test...") grants = bucket.list_grants() return grants @@ -97,7 +97,7 @@ class APIRados: counter+1, Constants.RGWAConstants.BUCKET_RETRIES_NUMBER)) time.sleep(session.wait_until_time_pause_long) else: - raise TimeoutError("Max retries exceeded, failing test...") + raise Exception("Max retries exceeded, failing test...") logger.debug("bucket are ready to continue!") return True diff --git a/services/frontend/base_actions/wait.py b/services/frontend/base_actions/wait.py index 4434bb1..642f0ab 100644 --- a/services/frontend/base_actions/wait.py +++ b/services/frontend/base_actions/wait.py @@ -150,8 +150,8 @@ class Wait: ) return True # If failed - count the failure and add the error to list of errors. - except Exception as e: - error_msg = "Didn't find CSS Selector " + element_css + except Exception: + # error_msg = "Didn't find CSS Selector " + element_css return False @staticmethod @@ -210,7 +210,7 @@ class Wait: "Checking if {} page is loaded. ".format( session.ice_driver.current_url)) time.sleep(session.wait_until_time_pause) - except Exception as exception: + except Exception: time.sleep(session.wait_until_time_pause) continue diff --git a/services/frontend/fe_cms.py b/services/frontend/fe_cms.py index 9f5300d..168a09a 100644 --- a/services/frontend/fe_cms.py +++ b/services/frontend/fe_cms.py @@ -40,10 +40,8 @@ from services.constants import Constants from services.database.db_cms import DBCMS from services.frontend.base_actions.click import Click from services.frontend.base_actions.enter import Enter -from services.frontend.base_actions.get import Get from services.frontend.base_actions.wait import Wait from services.frontend.fe_dashboard import FEDashboard -from services.frontend.fe_general import FEGeneral from services.frontend.fe_user import FEUser from services.logging_service import LoggingServiceFactory from services.session import session diff --git a/services/frontend/fe_general.py b/services/frontend/fe_general.py index 10f9c72..5974801 100644 --- a/services/frontend/fe_general.py +++ b/services/frontend/fe_general.py @@ -121,7 +121,7 @@ class FEGeneral(Helper): Wait.page_has_loaded() success = True break - except: + except Exception: i += 1 time.sleep(1) pass diff --git a/tests/uiTests/test_left_nav_panel.py b/tests/uiTests/test_left_nav_panel.py index d90d3bb..f564286 100644 --- a/tests/uiTests/test_left_nav_panel.py +++ b/tests/uiTests/test_left_nav_panel.py @@ -190,7 +190,7 @@ class TestLeftNavPanel(TestUiBase): Wait.text_by_id(self.left_panel_eng_id, self.eng_title) DB.VirtualFunction.remove_engagement_from_recent( self.user_content['vf_uuid']) - Frontend.General.refresh() + Frontend.General.refresh() Frontend.Dashboard.statuses_search_vf( self.user_content['engagement_manual_id'], self.user_content['vfName']) |