[elbe-devel] [PATCH 1/1] soapclient: Fix print's ascii fallback on wait_busy

bage at linutronix.de bage at linutronix.de
Tue Aug 11 15:53:52 CEST 2020


From: Bastian Germann <bage at linutronix.de>

print() takes a string in Python3 and will use ascii as an encoding
fallback, which makes Elbe error on any non-ascii character.
Fix that by encoding the argument as utf-8.

Co-Developed-by: Olivier Dion <dion at linutronix.de>
Signed-off-by: Bastian Germann <bage at linutronix.de>
---
 elbepack/soapclient.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index c8acc217c..bc27fa7f2 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -637,7 +637,7 @@ class WaitProjectBusyAction(ClientAction):
             if msg == 'ELBE-FINISH':
                 break
 
-            print(msg)
+            print(msg.encode(encoding="utf-8", errors="replace"))
 
         # exited the while loop -> the project is not busy anymore,
         # check, whether everything is ok.
-- 
2.28.0



More information about the elbe-devel mailing list