]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology/task: decode str returned from PIPE 1439/head
authorKefu Chai <kchai@redhat.com>
Sun, 5 Apr 2020 16:27:15 +0000 (00:27 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 7 Apr 2020 17:13:35 +0000 (01:13 +0800)
which is bytes, and should be decoded before calling `split(a_str)`

Signed-off-by: Kefu Chai <kchai@redhat.com>
teuthology/task/internal/__init__.py

index ad590e96a6064dc186c38af1c037849ede96be95..52a24df265c49093895afd46d939d5784b60ad10 100644 (file)
@@ -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()