diff options
author | Vincent Danno <vincent.danno@orange.com> | 2021-05-26 13:08:55 +0200 |
---|---|---|
committer | Vincent Danno <vincent.danno@orange.com> | 2021-06-01 20:40:32 +0200 |
commit | a656fd764b0a608caaf198bfa9685a09a7eaca16 (patch) | |
tree | 501fa47e06658b8a43e2ccca4837c530a49dfc72 /xtesting/core/mts.py | |
parent | 6192b2cf9ffd46bdb8189ce3236cf4d9b722b69c (diff) |
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 <vincent.danno@orange.com>
Change-Id: I840211990b76f77a46e9e737fc4a4c857b57c0b2
Diffstat (limited to 'xtesting/core/mts.py')
-rw-r--r-- | xtesting/core/mts.py | 20 |
1 files changed, 8 insertions, 12 deletions
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 |