From 7d201f567056a19d98773cc7504b987117aa53e3 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 6 Apr 2020 00:27:15 +0800 Subject: [PATCH] teuthology/task: decode str returned from PIPE which is bytes, and should be decoded before calling `split(a_str)` Signed-off-by: Kefu Chai --- teuthology/task/internal/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- 2.39.5