summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-16 18:40:39 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:01 +0100
commit63404baadbfd1225bbb955f8c8f817073aef65d8 (patch)
treeeb1f3060a7e8e814bf409079c442d797d0c80500 /meta/lib
parentaa10d71aeed6647a8a979040e4c2b2210bac4334 (diff)
downloadopenembedded-core-contrib-63404baadbfd1225bbb955f8c8f817073aef65d8.tar.gz
openembedded-core-contrib-63404baadbfd1225bbb955f8c8f817073aef65d8.tar.bz2
openembedded-core-contrib-63404baadbfd1225bbb955f8c8f817073aef65d8.zip
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>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index c1d07d9b41..3d60433cae 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