[elbe-devel] [PATCH] Python3: change to build the initvm with Python3

Bastian Germann bage at linutronix.de
Mon Jan 13 14:15:24 CET 2020


Am 13.01.20 um 12:50 schrieb Christian Teklenborg:
> Python3 strings are unicode if not encoded. But the write() function needs
> binary strings in this case. So encode it with ascii-encoding.

Please add your Signed-off-by line.

> ---
>  elbepack/commands/init.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/elbepack/commands/init.py b/elbepack/commands/init.py
> index 46cd8dcd..724babf1 100644
> --- a/elbepack/commands/init.py
> +++ b/elbepack/commands/init.py
> @@ -245,7 +245,7 @@ def run_command(argv):
>              do('gpg --no-options \
>                      --no-default-keyring \
>                      --keyring %s --import' % import_keyring,
> -               stdin="".join(keys),
> +               stdin="".join(keys).encode('ascii'),
>                 allow_fail=True,
>                 env_add={'GNUPGHOME': out_path})
>  
> 



More information about the elbe-devel mailing list