All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] classes: decode output data to text
@ 2022-12-22 10:38 Pawel Zalewski
  2023-01-06 12:06 ` [OE-core] " Richard Purdie
  2023-01-16 11:01 ` Richard Purdie
  0 siblings, 2 replies; 9+ messages in thread
From: Pawel Zalewski @ 2022-12-22 10:38 UTC (permalink / raw)
  To: openembedded-core; +Cc: Pawel Zalewski

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>
---
 meta/classes/fs-uuid.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/fs-uuid.bbclass b/meta/classes/fs-uuid.bbclass
index 9b53dfba7a..731ea575bd 100644
--- a/meta/classes/fs-uuid.bbclass
+++ b/meta/classes/fs-uuid.bbclass
@@ -4,7 +4,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]
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-01-16 11:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 10:38 [PATCH] classes: decode output data to text Pawel Zalewski
2023-01-06 12:06 ` [OE-core] " Richard Purdie
2023-01-06 12:40   ` Pawel Zalewski
2023-01-06 12:43     ` Alexander Kanavin
2023-01-06 13:10       ` Pawel Zalewski
2023-01-06 13:32         ` Alexander Kanavin
2023-01-16 10:58           ` Richard Purdie
2023-01-16 11:01 ` Richard Purdie
2023-01-16 11:14   ` Pawel Zalewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.