From: Kefu Chai Date: Sun, 5 Apr 2020 16:27:15 +0000 (+0800) Subject: teuthology/task: decode str returned from PIPE X-Git-Tag: 1.1.0~132^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7d201f567056a19d98773cc7504b987117aa53e3;p=teuthology.git teuthology/task: decode str returned from PIPE which is bytes, and should be decoded before calling `split(a_str)` Signed-off-by: Kefu Chai --- diff --git a/teuthology/task/internal/__init__.py b/teuthology/task/internal/__init__.py index ad590e96a6..52a24df265 100644 --- a/teuthology/task/internal/__init__.py +++ b/teuthology/task/internal/__init__.py @@ -8,6 +8,7 @@ import logging import os import time import yaml +import six import subprocess import teuthology.lock.ops @@ -308,7 +309,7 @@ def fetch_binaries_for_coredumps(path, remote): # 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 = dump_out.split("from '")[1].split(' ')[0] + dump_program = six.ensure_str(dump_out).split("from '")[1].split(' ')[0] # Find path on remote server: remote_path = remote.sh(['which', dump_program]).rstrip()