[oe-commits] [openembedded-core] 09/21: qemurunner: convert data when working with socket
git at git.openembedded.org
git at git.openembedded.org
Thu Jun 2 07:25:03 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 210e290c9251839dc74e3aabdcea3655dd707a50
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: 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.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/utils/qemurunner.py | 4 ++--
1 file 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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list