1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

utils/android: Fix inconsistent logfile read mode

As the exoplayer workload did not specify a pre-existing logfile, it is
created for it by default in LogcatMonitor. This default method opens
the logfile in 'byte' mode rather than the expected 'string' mode.

Regex operations that depend on the logfile for event triggering expect it to
be in 'string' mode, which was not the case.
This commit is contained in:
Jonathan Paynter 2020-06-23 17:15:43 +01:00 committed by Marc Bonnici
parent 20d1eabaf0
commit af8c47151e

View File

@ -789,7 +789,7 @@ class LogcatMonitor(object):
if outfile:
self._logfile = open(outfile, 'w')
else:
self._logfile = tempfile.NamedTemporaryFile()
self._logfile = tempfile.NamedTemporaryFile(mode='w')
self.target.clear_logcat()