From fa8f32f2d4919ac83a00ea8012a7f0de0de9241c Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Fri, 26 Jul 2019 16:59:14 +0200 Subject: Switch to Python 3.7 and Alpine 3.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It also allows building docs as doc8 is broken due to latest OpenStack's upper-constraints. pylint is updated to 2.3.1 (lastest py3.7 version) It disables perm as umask is currently false on lf-virtual1. Change-Id: If09d4796d48b7d0591e7926621d3bbf5ca1b6c24 Signed-off-by: Cédric Ollivier --- functest/core/cloudify.py | 7 +++---- functest/core/singlevm.py | 9 ++++----- functest/core/tenantnetwork.py | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'functest/core') diff --git a/functest/core/cloudify.py b/functest/core/cloudify.py index 21bfc937e..b5bd1b3c2 100644 --- a/functest/core/cloudify.py +++ b/functest/core/cloudify.py @@ -147,7 +147,7 @@ class Cloudify(singlevm.SingleVm2): self.cfy_client.executions.cancel( execution['id'], force=True) except Exception: # pylint: disable=broad-except - self.__logger.warn("Can't cancel the current exec") + self.__logger.warning("Can't cancel the current exec") execution = self.cfy_client.executions.start( dep_name, 'uninstall', parameters=dict(ignore_failure=True)) wait_for_execution(self.cfy_client, execution, self.__logger) @@ -191,9 +191,8 @@ def wait_for_execution(client, execution, logger, timeout=3600, ): 'execution of operation {0} for deployment {1} ' 'timed out'.format(execution.workflow_id, execution.deployment_id)) - else: - # update the remaining timeout - timeout = deadline - time.time() + # update the remaining timeout + timeout = deadline - time.time() if not execution_ended: execution = client.executions.get(execution.id) diff --git a/functest/core/singlevm.py b/functest/core/singlevm.py index 521eb1484..dce6d819b 100644 --- a/functest/core/singlevm.py +++ b/functest/core/singlevm.py @@ -230,11 +230,10 @@ class VmReady1(tenantnetwork.TenantNetwork1): self.__logger.debug( "regex found: '%s' in console\n%s", regex, console) return True - else: - self.__logger.debug( - "try %s: cannot find regex '%s' in console\n%s", - iloop + 1, regex, console) - time.sleep(10) + self.__logger.debug( + "try %s: cannot find regex '%s' in console\n%s", + iloop + 1, regex, console) + time.sleep(10) self.__logger.error("cannot find regex '%s' in console", regex) return False diff --git a/functest/core/tenantnetwork.py b/functest/core/tenantnetwork.py index ae739ac36..604e49ae5 100644 --- a/functest/core/tenantnetwork.py +++ b/functest/core/tenantnetwork.py @@ -33,7 +33,7 @@ from functest.utils import config from functest.utils import env -class NewProject(object): +class NewProject(): """Ease creating new projects/users""" # pylint: disable=too-many-instance-attributes -- cgit 1.2.3-korg