From 74aed9c82b4b48d2a4be6ee3a72a38fdcc6d5a58 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 12 Apr 2018 10:34:11 -0500 Subject: [PATCH] xfs_scrub_all: use system encoding for lsblk output decoding 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 Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- scrub/xfs_scrub_all.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrub/xfs_scrub_all.in b/scrub/xfs_scrub_all.in index 83c4e2184..d374f9227 100644 --- a/scrub/xfs_scrub_all.in +++ b/scrub/xfs_scrub_all.in @@ -48,7 +48,7 @@ def find_mounts(): 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 -- 2.47.2