Fix former pep8 issues 62/70462/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Fri, 3 Jul 2020 18:05:34 +0000 (20:05 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 4 Jul 2020 08:53:40 +0000 (10:53 +0200)
It's allowed by the newer version

Change-Id: Ief4cb2f0cce8da8af6e0bee275772f0940f56d5a
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 6493a5acf8a3724f7c00fc971542d25b42a36e4c)

functest_kubernetes/ims/ims.py
functest_kubernetes/security/security.py

index 9331257..4d1e8c5 100644 (file)
@@ -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)
index 33e70f8..f4e10ca 100644 (file)
@@ -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: