From: Cédric Ollivier Date: Fri, 3 Jul 2020 18:05:34 +0000 (+0200) Subject: Fix former pep8 issues X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F62%2F70462%2F2;p=functest-kubernetes.git Fix former pep8 issues It's allowed by the newer version Change-Id: Ief4cb2f0cce8da8af6e0bee275772f0940f56d5a Signed-off-by: Cédric Ollivier (cherry picked from commit 6493a5acf8a3724f7c00fc971542d25b42a36e4c) --- diff --git a/functest_kubernetes/ims/ims.py b/functest_kubernetes/ims/ims.py index 93312575..4d1e8c5a 100644 --- a/functest_kubernetes/ims/ims.py +++ b/functest_kubernetes/ims/ims.py @@ -66,6 +66,7 @@ class Vims(testcase.TestCase): self.namespace, body=body) self.__logger.debug("create_namespaced_config_map: %s", api_response) for deployment in self.deployment_list: + # pylint: disable=bad-continuation with open(pkg_resources.resource_filename( 'functest_kubernetes', 'ims/{}-depl.yaml'.format(deployment))) as yfile: @@ -76,6 +77,7 @@ class Vims(testcase.TestCase): self.__logger.debug( "create_namespaced_deployment: %s", api_response) for service in self.deployment_list: + # pylint: disable=bad-continuation with open(pkg_resources.resource_filename( 'functest_kubernetes', 'ims/{}-svc.yaml'.format(service))) as yfile: @@ -85,6 +87,7 @@ class Vims(testcase.TestCase): self.__logger.info("Service %s created", resp.metadata.name) self.__logger.debug( "create_namespaced_service: %s", api_response) + # pylint: disable=no-member status = self.deployment_list.copy() watch_deployment = watch.Watch() for event in watch_deployment.stream( @@ -120,8 +123,8 @@ class Vims(testcase.TestCase): func=self.corev1.list_namespaced_pod, namespace=self.namespace, timeout_seconds=self.watch_timeout): if event["object"].metadata.name == self.test_container_name: - if (event["object"].status.phase == 'Succeeded' - or event["object"].status.phase == 'Error'): + if (event["object"].status.phase == 'Succeeded' or + event["object"].status.phase == 'Error'): watch_deployment.stop() api_response = self.corev1.read_namespaced_pod_log( name=self.test_container_name, namespace=self.namespace) diff --git a/functest_kubernetes/security/security.py b/functest_kubernetes/security/security.py index 33e70f86..f4e10ca3 100644 --- a/functest_kubernetes/security/security.py +++ b/functest_kubernetes/security/security.py @@ -46,6 +46,7 @@ class SecurityTesting(testcase.TestCase): """ assert self.job_name + # pylint: disable=bad-continuation with open(pkg_resources.resource_filename( "functest_kubernetes", "security/{}.yaml".format(self.job_name))) as yfile: