From 3573f33744da7e98a3fa0cfb100466486704cbbd Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 28 Jun 2020 19:46:01 +0800 Subject: [PATCH] qa/tasks/workunit: drop py2 support Signed-off-by: Kefu Chai --- qa/tasks/workunit.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qa/tasks/workunit.py b/qa/tasks/workunit.py index 46eeef41f2e..b01ef74a5f7 100644 --- a/qa/tasks/workunit.py +++ b/qa/tasks/workunit.py @@ -6,8 +6,6 @@ import pipes import os import re -import six - from tasks.util import get_remote_for_role from tasks.util.workunit import get_refspec_after_overrides @@ -105,7 +103,7 @@ def task(ctx, config): # Create scratch dirs for any non-all workunits log.info('Making a separate scratch dir for every client...') for role in clients.keys(): - assert isinstance(role, six.string_types) + assert isinstance(role, str) if role == "all": continue @@ -316,7 +314,7 @@ def _run_tests(ctx, refspec, role, tests, env, basedir, to False is passed, the 'timeout' command is not used. """ testdir = misc.get_testdir(ctx) - assert isinstance(role, six.string_types) + assert isinstance(role, str) cluster, type_, id_ = misc.split_role(role) assert type_ == 'client' remote = get_remote_for_role(ctx, role) @@ -364,7 +362,7 @@ def _run_tests(ctx, refspec, role, tests, env, basedir, ) workunits_file = '{tdir}/workunits.list.{role}'.format(tdir=testdir, role=role) - workunits = sorted(six.ensure_str(misc.get_file(remote, workunits_file)).split('\0')) + workunits = sorted(misc.get_file(remote, workunits_file).decode().split('\0')) assert workunits try: -- 2.39.5