Use binary mode for proto ingestion

Bug: webrtc:13607
Change-Id: Id0385f74215360ff604641a50ce9f599c87abb5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251327
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#35960}
This commit is contained in:
Christoffer Jansson
2022-02-08 21:43:45 +01:00
committed by WebRTC LUCI CQ
parent d12a14e21f
commit c98fb2ca0f

View File

@ -195,8 +195,8 @@ def _ApplyHacks(dicts):
def _LoadHistogramSetFromProto(options):
hs = histogram_set.HistogramSet()
with options.input_results_file as f:
hs.ImportProto(f.read().decode('utf-8'))
with open(options.input_results_file, 'rb') as f:
hs.ImportProto(f.read())
return hs