Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 default support & solving python3 buffer migration problems #1284

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions tools/idf_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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):
Expand Down