From 169d7dc3c9d8470eb67dddac1d018a821e57305e Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Fri, 16 Jun 2023 09:39:10 +0200 Subject: [PATCH] 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. --- tools/idf_monitor_base/serial_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/idf_monitor_base/serial_handler.py b/tools/idf_monitor_base/serial_handler.py index 827cb28f78..4718f2b489 100644 --- a/tools/idf_monitor_base/serial_handler.py +++ b/tools/idf_monitor_base/serial_handler.py @@ -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)