2d98c3c1d3
- Fix display and input of text in serial console (bsc#1070896) python3-fix-bytes-string-mess-in-serial-console.patch - Fix virt-bootstrap UI integration (bsc#1063367) 0001-Improve-container-image-url-example.patch 0002-create-wizard-fix-alignment-in-os-container-page.patch 0003-oscontainer-ask-root-password-in-the-wizard.patch 0004-Harmonize-invisible_char-values.patch OBS-URL: https://build.opensuse.org/request/show/558209 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=390
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From e025b9c0fe78621f1c6f9f7655c142a8a3d516fe Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cedric.bosdonnat@free.fr>
|
|
Date: Wed, 13 Dec 2017 11:35:39 +0100
|
|
Subject: [PATCH] python3: fix bytes/string mess in serial console
|
|
|
|
Add a few encode() and decode() to convert between libvirt stream
|
|
functions expecting bytes arrays and Vte callbacks providing strings.
|
|
---
|
|
virtManager/serialcon.py | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/virtManager/serialcon.py b/virtManager/serialcon.py
|
|
index 7caf6db4..21ab8ae7 100644
|
|
--- a/virtManager/serialcon.py
|
|
+++ b/virtManager/serialcon.py
|
|
@@ -149,7 +149,7 @@ class LibvirtConsoleConnection(ConsoleConnection):
|
|
|
|
self.stream = None
|
|
|
|
- self.streamToTerminal = ""
|
|
+ self.streamToTerminal = b""
|
|
self.terminalToStream = ""
|
|
|
|
def _event_on_stream(self, stream, events, opaque):
|
|
@@ -187,7 +187,7 @@ class LibvirtConsoleConnection(ConsoleConnection):
|
|
self.terminalToStream):
|
|
|
|
try:
|
|
- done = self.stream.send(self.terminalToStream)
|
|
+ done = self.stream.send(self.terminalToStream.encode())
|
|
except Exception:
|
|
logging.exception("Error sending stream data")
|
|
self.close()
|
|
@@ -262,7 +262,7 @@ class LibvirtConsoleConnection(ConsoleConnection):
|
|
return
|
|
|
|
terminal.feed(self.streamToTerminal)
|
|
- self.streamToTerminal = ""
|
|
+ self.streamToTerminal = b""
|
|
|
|
|
|
class vmmSerialConsole(vmmGObject):
|
|
--
|
|
2.15.1
|
|
|