On 3/20/18 10:41 PM, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > 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@xxxxxxxxxx> Its-all-python-to-me-by: Eric Sandeen <sandeen@xxxxxxxxxx> Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx> > --- > 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 83c4e21..d374f92 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 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html