From 3aa5c19a14d0ab1d3f182ddbef29f3f41a69c819 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 17 Jun 2020 17:21:17 +0800 Subject: [PATCH] teuthology/task: drop six.ensure_str() Signed-off-by: Kefu Chai --- teuthology/task/internal/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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() -- 2.39.5