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

Bastian Germann bage at linutronix.de
Thu Sep 24 17:10:10 CEST 2020


Am 24.09.20 um 16:56 schrieb Torben Hohn:
> get_command_out() returns bytes.
> 
> decode() the bytes.
> 
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

Reviewed-by: Bastian Germann <bage 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):
> 


More information about the elbe-devel mailing list