]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/fs-uuid: Fix command output decoding issue
authorPawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Thu, 22 Dec 2022 10:38:29 +0000 (10:38 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Jan 2023 22:22:00 +0000 (22:22 +0000)
The default return value from subprocess.check_output is an encoded byte.
The applied fix will decode the value to a string.

Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/classes-recipe/fs-uuid.bbclass

index a9e7eb8c67c18e62c53901eea0dd55e023df6082..e215f06c80cbcd47a8d1bcba447f4596f4c1a338 100644 (file)
@@ -10,7 +10,7 @@
 def get_rootfs_uuid(d):
     import subprocess
     rootfs = d.getVar('ROOTFS')
-    output = subprocess.check_output(['tune2fs', '-l', rootfs])
+    output = subprocess.check_output(['tune2fs', '-l', rootfs], text=True)
     for line in output.split('\n'):
         if line.startswith('Filesystem UUID:'):
             uuid = line.split()[-1]