Skip to content

Commit 7634f36

Browse files
authored
Merge pull request #12419 from ARMmbed/fix-gh12290
Fix #12290: crash_log_parser on py3
2 parents d78e009 + 2ad6f45 commit 7634f36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/debug_tools/crash_log_parser/crash_log_parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
class ElfHelper(object):
3434
def __init__(self, elf_file, map_file):
35-
36-
op = check_output([_NM_EXEC, _OPT, elf_file.name])
35+
36+
op = check_output([_NM_EXEC, _OPT, elf_file.name]).decode('utf-8')
3737
self.maplines = map_file.readlines()
3838
self.matches = _PTN.findall(op)
3939
self.addrs = [int(x[0], 16) for x in self.matches]
@@ -115,8 +115,8 @@ def parse_line_for_register(line):
115115
def main(crash_log, elfhelper):
116116
mmfar_val = 0
117117
bfar_val = 0
118-
lines = iter(crash_log.read().splitlines())
119-
118+
lines = iter(crash_log.read().decode('utf-8').splitlines())
119+
120120
for eachline in lines:
121121
if "++ MbedOS Fault Handler ++" in eachline:
122122
break

0 commit comments

Comments
 (0)