diff options
author | Davide Italiano <davide@freebsd.org> | 2019-02-20 00:54:07 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2019-02-20 00:54:07 +0000 |
commit | 89c77054a245e932091e05da35f38faae6e42b06 (patch) | |
tree | 8a18670b53bbc4f6f6da7c64c83384a4dfed4934 /lldb/packages/Python/lldbsuite/test | |
parent | ace244ea3c2981f6cb9a9f97237e83b408b8760e (diff) | |
download | bcm5719-llvm-89c77054a245e932091e05da35f38faae6e42b06.tar.gz bcm5719-llvm-89c77054a245e932091e05da35f38faae6e42b06.zip |
[testsuite] Fix TestUnicodeString to work with Py2 and Py3.
llvm-svn: 354414
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbinline.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbinline.py b/lldb/packages/Python/lldbsuite/test/lldbinline.py index c01fef00fe4..4c3b08bf1d0 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbinline.py +++ b/lldb/packages/Python/lldbsuite/test/lldbinline.py @@ -5,6 +5,7 @@ from __future__ import absolute_import import os # Third-party modules +import io # LLDB modules import lldb @@ -13,7 +14,6 @@ from . import configuration from . import lldbutil from .decorators import * - def source_type(filename): _, extension = os.path.splitext(filename) return { @@ -45,7 +45,7 @@ class CommandParser: def parse_source_files(self, source_files): for source_file in source_files: - file_handle = open(source_file) + file_handle = io.open(source_file, encoding='utf-8') lines = file_handle.readlines() line_number = 0 # non-NULL means we're looking through whitespace to find |