[elbe-devel] [PATCH v2 14/27] hdimg: fix losetup returning betes instead of str

Torben Hohn torben.hohn at linutronix.de
Thu Sep 24 16:56:11 CEST 2020


get_command_out() returns bytes.

decode() the bytes.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/hdimg.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index 1d22cd49d..965fff856 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -159,7 +159,7 @@ class grubinstaller_base(object):
     @staticmethod
     def losetup(f):
         loopdev = get_command_out('losetup --find --show "%s"' % f)
-        return loopdev.rstrip('\n')
+        return loopdev.decode().rstrip('\n')
 
 
 class grubinstaller202(grubinstaller_base):
-- 
2.20.1



More information about the elbe-devel mailing list