summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lldbtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 63be1809c14..015615bd875 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -41,6 +41,7 @@ from distutils.version import LooseVersion
import gc
import glob
import inspect
+import io
import os, sys, traceback
import os.path
import re
@@ -201,7 +202,7 @@ def EnvArray():
def line_number(filename, string_to_match):
"""Helper function to return the line number of the first matched string."""
- with open(filename, 'r') as f:
+ with io.open(filename, mode='r', encoding="utf-8") as f:
for i, line in enumerate(f):
if line.find(string_to_match) != -1:
# Found our match.
OpenPOWER on IntegriCloud