[gnome-continuous-yocto/gnomeostree-3.28-rocko: 609/8267] qemurunner: convert data when working with socket
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 609/8267] qemurunner: convert data when working with socket
- Date: Sat, 16 Dec 2017 20:40:00 +0000 (UTC)
commit 63404baadbfd1225bbb955f8c8f817073aef65d8
Author: Ed Bartosh <ed bartosh linux intel com>
Date: Mon May 16 18:40:39 2016 +0300
qemurunner: convert data when working with socket
Converted str to bytes before sending to socket.
Converted bytes to str after receiving from socket.
This should fix TypeError: 'str' does not support the buffer interface
for qemurunner.run_serial method.
(From OE-Core rev: 210e290c9251839dc74e3aabdcea3655dd707a50)
Signed-off-by: Ed Bartosh <ed bartosh linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/lib/oeqa/utils/qemurunner.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index c1d07d9..3d60433 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -376,14 +376,14 @@ class QemuRunner:
data = ''
status = 0
- self.server_socket.sendall(command)
+ self.server_socket.sendall(command.encode('utf-8'))
keepreading = True
while keepreading:
sread, _, _ = select.select([self.server_socket],[],[],5)
if sread:
answer = self.server_socket.recv(1024)
if answer:
- data += answer
+ data += answer.decode('utf-8')
# Search the prompt to stop
if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):
keepreading = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]