If the output is like
core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'systemd-sysusers', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0, execfn: '/bin/systemd-sysusers', platform: 'x86_64'
then there is no space; first discard the ' and what follows, and
then discard anything after the space (if present!)
Signed-off-by: Sage Weil <sage@newdream.net>
# 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 = dump_out.split("from '")[1].split("'")[0].split(' ')[0]
# Find path on remote server:
remote_path = remote.sh(['which', dump_program]).rstrip()