summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
index 066158d0877..99986bc96a2 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
@@ -54,7 +54,7 @@ def read_packet(f, verbose=False, trace_file=None):
'''Decode a JSON packet that starts with the content length and is
followed by the JSON bytes from a file 'f'
'''
- line = f.readline()
+ line = f.readline().decode("utf-8")
if len(line) == 0:
return None
@@ -121,7 +121,7 @@ class DebugCommunication(object):
@classmethod
def encode_content(cls, s):
- return "Content-Length: %u\r\n\r\n%s" % (len(s), s)
+ return ("Content-Length: %u\r\n\r\n%s" % (len(s), s)).encode("utf-8")
@classmethod
def validate_response(cls, command, response):
OpenPOWER on IntegriCloud