From 61d5a570d14ddc4a4a8095ac31e01ce4eeb81ad6 Mon Sep 17 00:00:00 2001 From: supernlogn Date: Mon, 9 Jul 2018 04:52:20 +0300 Subject: [PATCH 1/2] python2&3,ASCII&greek tests passed for the new version --- tools/idf_monitor.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/idf_monitor.py b/tools/idf_monitor.py index 9bb0712a487..9ecfddc5b7a 100755 --- a/tools/idf_monitor.py +++ b/tools/idf_monitor.py @@ -252,7 +252,7 @@ def __init__(self, print_filter): self._dict[s[0]] = lev def match(self, line): try: - m = self._re.search(line) + m = self._re.search(str(line)) if m: lev = self.level[m.group(1)] if m.group(2) in self._dict: @@ -303,9 +303,9 @@ def getkey_patched(self): self.exit_key = CTRL_RBRACKET self.translate_eol = { - "CRLF": lambda c: c.replace(b"\n", b"\r\n"), - "CR": lambda c: c.replace(b"\n", b"\r"), - "LF": lambda c: c.replace(b"\r", b"\n"), + "CRLF": lambda c: c.replace("\n", "\r\n"), + "CR": lambda c: c.replace("\n", "\r"), + "LF": lambda c: c.replace("\r", "\n"), }[eol] # internal state @@ -414,7 +414,7 @@ def handle_serial_input(self, data, finalize_line=False): # handle_serial_input is invoked def handle_possible_pc_address_in_line(self, line): - line = self._pc_address_buffer + line + line = str(self._pc_address_buffer + line) self._pc_address_buffer = b"" for m in re.finditer(MATCH_PCADDR, line): self.lookup_pc_address(m.group()) @@ -525,7 +525,7 @@ def lookup_pc_address(self, pc_addr): ["%saddr2line" % self.toolchain_prefix, "-pfiaC", "-e", self.elf_file, pc_addr], cwd=".") - if not "?? ??:0" in translation: + if not "?? ??:0" in str(translation): yellow_print(translation) def check_gdbstub_trigger(self, line): From 8fadb2d9de555d57332fda99256a1c4e0e2e2931 Mon Sep 17 00:00:00 2001 From: supernlogn Date: Mon, 9 Jul 2018 04:56:30 +0300 Subject: [PATCH 2/2] python2&3,ASCII&greek tests passed for the new version --- Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kconfig b/Kconfig index 9d295e671fb..5c409a8cae3 100644 --- a/Kconfig +++ b/Kconfig @@ -14,7 +14,7 @@ config TOOLPREFIX a crosstool-ng gcc setup that is in your PATH. config PYTHON - string "Python 2 interpreter" + string "Python interpreter" default "python" help The executable name/path that is used to run python. On some systems Python 2.x