Don't hardcode utf-8 as the decoding scheme for lsblk output, since the
system could set it to anything else.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
result.wait()
if result.returncode != 0:
return fs
- sarray = [x.decode('utf-8') for x in result.stdout.readlines()]
+ sarray = [x.decode(sys.stdout.encoding) for x in result.stdout.readlines()]
output = ' '.join(sarray)
bdevdata = json.loads(output)
# The lsblk output had better be in disks-then-partitions order