From a21f7f598d965461ce67a5720b850c06a5366047 Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Fri, 16 Jun 2023 15:52:42 +0900 Subject: [PATCH] STT: Add encoding option to read trace files Bug: 284915566 Test: read_build_trace_gz.py build.trace.gz Change-Id: I90dc3e7c70cecf63ab1a29d972bf8333423436e7 --- treble/read_build_trace_gz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/treble/read_build_trace_gz.py b/treble/read_build_trace_gz.py index 6431876e1..bd14ec3ce 100644 --- a/treble/read_build_trace_gz.py +++ b/treble/read_build_trace_gz.py @@ -35,7 +35,7 @@ class Trace: self.target = os.path.splitext(os.path.basename(trace_file))[0] if not os.path.isfile(trace_file): return - self._trace_file = gzip.open(trace_file, 'r') + self._trace_file = gzip.open(trace_file, 'rt', encoding='utf-8') self._trace_data = json.load(self._trace_file) for t in self._trace_data: if 'ph' not in t: