From 3cb2793e51c1bca7836213a5519c5a0adc94cdec Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 23 Jun 2020 15:59:46 +0100 Subject: [PATCH] collector/serial_trace: Ensure log is opened in binary mode --- devlib/collector/serial_trace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/collector/serial_trace.py b/devlib/collector/serial_trace.py index 4abceb9..5b538e7 100644 --- a/devlib/collector/serial_trace.py +++ b/devlib/collector/serial_trace.py @@ -54,7 +54,7 @@ class SerialTraceCollector(CollectorBase): if self.output_path is None: raise RuntimeError("Output path was not set.") - self._outfile_fh = open(self.output_path, 'w') + self._outfile_fh = open(self.output_path, 'wb') start_marker = "-------- Starting serial logging --------\n" self._outfile_fh.write(start_marker.encode('utf-8'))