From a656fd764b0a608caaf198bfa9685a09a7eaca16 Mon Sep 17 00:00:00 2001 From: Vincent Danno Date: Wed, 26 May 2021 13:08:55 +0200 Subject: Drop six python 2 was dropped [1] so we don't need six anymore [1]: https://gerrit.opnfv.org/gerrit/c/functest-xtesting/+/68262 Signed-off-by: Vincent Danno Change-Id: I840211990b76f77a46e9e737fc4a4c857b57c0b2 --- xtesting/core/mts.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'xtesting/core/mts.py') diff --git a/xtesting/core/mts.py b/xtesting/core/mts.py index d6865a61..6ced2530 100644 --- a/xtesting/core/mts.py +++ b/xtesting/core/mts.py @@ -25,7 +25,6 @@ import time from lxml import etree import prettytable -import six from xtesting.core import testcase @@ -245,17 +244,14 @@ class MTSLauncher(testcase.TestCase): if console: sys.stdout.write(line.decode("utf-8")) f_stdout.write(line.decode("utf-8")) - if six.PY3: - try: - process.wait(timeout=max_duration) - except subprocess.TimeoutExpired: - process.kill() - self.__logger.info( - "Killing MTS process after %d second(s).", - max_duration) - return 3 - else: - process.wait() + try: + process.wait(timeout=max_duration) + except subprocess.TimeoutExpired: + process.kill() + self.__logger.info( + "Killing MTS process after %d second(s).", + max_duration) + return 3 with open(self.result_file, 'r') as f_stdin: self.__logger.debug("$ %s\n%s", cmd, f_stdin.read().rstrip()) return process.returncode -- cgit 1.2.3-korg