]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.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)
committerSteve Sakoman <steve@sakoman.com>
Fri, 10 Feb 2023 21:07:39 +0000 (11:07 -1000)
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>
(cherry picked from commit 046769fa952a511865c416b80d10af6287147fb7)
Signed-off-by: Steve Sakoman <steve@sakoman.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]