mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-30 23:41:52 +03:00
examples: Ensure we write bytes to the self-pipe
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@redhat.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user