diff options
author | Cedric Ollivier <cedric.ollivier@orange.com> | 2021-06-03 06:16:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2021-06-03 06:16:49 +0000 |
commit | ec6921039af3b016eecc6e609f2554aea0f81e2c (patch) | |
tree | 4d2df62475e73a563e572180a13dec3b5e1b994e /xtesting/core/mts.py | |
parent | 454bef238020d8ac0e986807f34dfc140362b629 (diff) | |
parent | a656fd764b0a608caaf198bfa9685a09a7eaca16 (diff) |
Merge "Drop six"
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 0530b84c..f1cf80ac 100644 --- a/xtesting/core/mts.py +++ b/xtesting/core/mts.py @@ -21,7 +21,6 @@ import time from lxml import etree import prettytable -import six from xtesting.core import testcase @@ -241,17 +240,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 |