tools: Fix IDF Monitor print filter when no ELF file is supplemented

A different serial handler class is used when there was no ELF file
passed do esp-idf-monitor. This fix will ensure that print filter check
is respected in this case as well.
This commit is contained in:
Roland Dobai 2023-06-16 09:39:10 +02:00
parent 6212ce9d94
commit 169d7dc3c9

View File

@ -256,9 +256,9 @@ class SerialHandlerNoElf(SerialHandler):
if self._serial_check_exit and line == console_parser.exit_key.encode('latin-1'):
raise SerialStopException()
self.logger.print(line + b'\n')
self.compare_elf_sha256(line.decode(errors='ignore'))
self._force_line_print = False
if self._force_line_print or line_matcher.match(line.decode(errors='ignore')):
self.logger.print(line + b'\n')
self._force_line_print = False
if self._last_line_part.startswith(CONSOLE_STATUS_QUERY):
self.logger.print(CONSOLE_STATUS_QUERY)