[elbe-devel] [PATCH] Python3: change to build the initvm with Python3
Christian Teklenborg
chris at linutronix.de
Mon Jan 13 14:17:08 CET 2020
Python3 strings are unicode if not encoded. But the write() function needs
binary strings in this case. So encode it with ascii-encoding.
Signed-off-by: Christian Teklenborg <chris at linutronix.de>
---
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})
--
2.20.1
More information about the elbe-devel
mailing list