Python 3 changed the return value of check_output to binary rather than
a string. This fix decodes the binary before calling splitlines, which
requires a string.
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
output = subprocess.check_output('ar -t %s' % file, preexec_fn=subprocess_setup, shell=True)
datafile = None
if output:
- for line in output.splitlines():
+ for line in output.decode().splitlines():
if line.startswith('data.tar.'):
datafile = line
break