On Mon, Dec 9, 2013 at 9:15 AM, Daniel P. Berrange <berrange(a)redhat.com> wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Strings in python3 default to unicode, so when writing to
the self-pipe we must be sure to use bytes by calling the
encode() method.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
examples/event-test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/event-test.py b/examples/event-test.py
index cf1a8b8..1402c04 100644
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -236,7 +236,7 @@ class virEventLoopPure:
def interrupt(self):
if self.runningPoll and not self.pendingWakeup:
self.pendingWakeup = True
- os.write(self.pipetrick[1], 'c')
+ os.write(self.pipetrick[1], 'c'.encode("UTF-8"))
# Registers a new file handle 'fd', monitoring for 'events'
(libvirt
--
1.8.3.1
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list