From 3d9a8699915a29dba877ecdf87093cbfe00e84e5 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Fri, 30 Apr 2021 10:32:13 -0500 Subject: [PATCH] Fix hacking check for service client Tempest hacking check _common_service_clients_check() still has the ignored_list_T110.txt file check but this file was already deleted a long back - https://review.opendev.org/c/openstack/tempest/+/568489 This fix the pep8 check for service client checks otherwise it fail on finding the ignored_list_T110.txt file. Change-Id: I6069d1c2f6368e768640ce69981241792ea81aac --- tempest/hacking/checks.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tempest/hacking/checks.py b/tempest/hacking/checks.py index 6a97a004a7..c1e6b2d125 100644 --- a/tempest/hacking/checks.py +++ b/tempest/hacking/checks.py @@ -140,20 +140,10 @@ def no_testtools_skip_decorator(logical_line): "decorators.skip_because from tempest.lib") -def _common_service_clients_check(logical_line, physical_line, filename, - ignored_list_file=None): +def _common_service_clients_check(logical_line, physical_line, filename): if not re.match('tempest/(lib/)?services/.*', filename): return False - if ignored_list_file is not None: - ignored_list = [] - with open('tempest/hacking/' + ignored_list_file) as f: - for line in f: - ignored_list.append(line.strip()) - - if filename in ignored_list: - return False - if not METHOD.match(physical_line): return False @@ -171,7 +161,7 @@ def get_resources_on_service_clients(physical_line, logical_line, filename, T110 """ if not _common_service_clients_check(logical_line, physical_line, - filename, 'ignored_list_T110.txt'): + filename): return for line in lines[line_number:]: @@ -199,7 +189,7 @@ def delete_resources_on_service_clients(physical_line, logical_line, filename, T111 """ if not _common_service_clients_check(logical_line, physical_line, - filename, 'ignored_list_T111.txt'): + filename): return for line in lines[line_number:]: