From: Kefu Chai Date: Wed, 17 Jun 2020 09:21:17 +0000 (+0800) Subject: teuthology/task: drop six.ensure_str() X-Git-Tag: 1.1.0~86^2~17 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3aa5c19a14d0ab1d3f182ddbef29f3f41a69c819;p=teuthology.git teuthology/task: drop six.ensure_str() Signed-off-by: Kefu Chai --- diff --git a/teuthology/task/internal/__init__.py b/teuthology/task/internal/__init__.py index 3b552127d2..640008e7e3 100644 --- a/teuthology/task/internal/__init__.py +++ b/teuthology/task/internal/__init__.py @@ -8,7 +8,6 @@ import logging import os import time import yaml -import six import subprocess import teuthology.lock.ops @@ -306,12 +305,12 @@ def fetch_binaries_for_coredumps(path, remote): dump_path = os.path.join(coredump_path, dump) dump_info = subprocess.Popen(['file', dump_path], stdout=subprocess.PIPE) - dump_out = dump_info.communicate()[0] + dump_out = dump_info.communicate()[0].decode() # Parse file output to get program, Example output: # 1422917770.7450.core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, \ # from 'radosgw --rgw-socket-path /home/ubuntu/cephtest/apache/tmp.client.0/fastcgi_soc' - dump_program = six.ensure_str(dump_out).split("from '")[1].split(' ')[0] + dump_program = dump_out.split("from '")[1].split(' ')[0] # Find path on remote server: remote_path = remote.sh(['which', dump_program]).rstrip()